Advertisement
hunter235711

Untitled

Nov 13th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. pruss = Icss("/dev/uio/pruss/module")
  2. core = pruss.core0 # CORE 0 is what we are using
  3. if core.halted: # this means the PRU hasn't been initialized
  4. pruss.initialize()
  5. print("Initializing both PRUs")
  6. else:
  7. core.full_reset() # reset the core
  8. print("PRU already initialized")
  9.  
  10. # load program
  11. pru_firmware_file = "PRU_FW.bin"
  12. with open(pru_firmware_file, "rb") as f:
  13. core.iram.write(f.read())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement