Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #include <stdint.h>
  2. #include "pru_cfg.h"
  3. #include "resource_table_empty.h"
  4.  
  5. volatile register uint32_t __R30;
  6. volatile register uint32_t __R31;
  7.  
  8. /* Mapping Constant table register to variable */
  9. volatile pruCfg CT_CFG __attribute__((cregister("PRU_CFG", near), peripheral));
  10.  
  11. void main() {
  12. uint32_t gpio;
  13.  
  14. /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */
  15. CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
  16.  
  17. /* GPI Mode 0, GPO Mode 0 */
  18. CT_CFG.GPCFG0 = 0;
  19.  
  20. gpio = 0x000FFFF;
  21.  
  22. __R30 = 0x0;
  23.  
  24. /* TODO: Create stop condition, else it will toggle indefinitely */
  25. while(1)
  26. {
  27. __R30 ^= gpio;
  28.  
  29. __delay_cycles(10000);
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement