Advertisement
Guest User

raspberry pi 4 nrf52840 adafruit bootloader

a guest
Nov 6th, 2021
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1.  
  2.  
  3. raspberry pi 4
  4. sudo apt-get install openocd
  5.  
  6.  
  7. openocd.cfg
  8. adapter driver bcm2835gpio
  9. bcm2835gpio_peripheral_base 0xFE000000
  10. bcm2835gpio_speed_coeffs 236181 60
  11. bcm2835gpio_swd_nums 25 24
  12. transport select swd
  13. set CHIPNAME nrf52840
  14. source [find target/nrf52.cfg]
  15. adapter speed 1000
  16. init
  17. targets
  18. reset halt
  19.  
  20.  
  21. SB1 soldered, SB2 cut
  22.  
  23.  
  24. downloaded pca10059_bootloader-0.6.2.zip
  25. extracted pca10059_bootloader-0.6.2_s140_6.1.1.hex
  26.  
  27.  
  28. modified /usr/share/openocd/scripts/target/nrf52.cfg
  29. #swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
  30. swj_newdap $_CHIPNAME cpu -expected-id
  31.  
  32.  
  33. sudo openocd
  34. Open On-Chip Debugger 0.10.0+dev-00114-g41bcbc67d-dirty (2021-01-18-16:43)
  35. Licensed under GNU GPL v2
  36. For bug reports, read
  37. http://openocd.org/doc/doxygen/bugs.html
  38. Info : BCM2835 GPIO JTAG/SWD bitbang driver
  39. Info : clock speed 1000 kHz
  40. Info : SWD DPIDR 0x2ba01477
  41. Info : nrf52840.cpu: hardware has 6 breakpoints, 4 watchpoints
  42. Error: nrf52840.cpu -- clearing lockup after double fault
  43. Info : starting gdb server for nrf52840.cpu on 3333
  44. Info : Listening on port 3333 for gdb connections
  45. target halted due to debug-request, current mode: Thread
  46. xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
  47. Info : Listening on port 6666 for tcl connections
  48. Info : Listening on port 4444 for telnet connections
  49.  
  50.  
  51. telnet localhost 4444
  52.  
  53.  
  54. targets
  55. TargetName Type Endian TapName State
  56. -- ------------------ ---------- ------ ------------------ ------------
  57. 0* nrf52840.cpu cortex_m little nrf52840.cpu halted
  58.  
  59.  
  60. flash banks
  61. #0 : nrf52840.flash (nrf5) at 0x00000000, size 0x00000000, buswidth 1, chipwidth 1
  62. #1 : nrf52840.uicr (nrf5) at 0x10001000, size 0x00000000, buswidth 1, chipwidth 1
  63.  
  64.  
  65. reg
  66. ===== arm v7m registers
  67. (0) r0 (/32): 0x00000000
  68. (1) r1 (/32): 0x00000000
  69. (2) r2 (/32): 0x00000000
  70. (3) r3 (/32): 0x00000000
  71. (4) r4 (/32): 0x00000000
  72. (5) r5 (/32): 0x00000000
  73. (6) r6 (/32): 0x00000000
  74. (7) r7 (/32): 0x00000000
  75. (8) r8 (/32): 0x00000000
  76. (9) r9 (/32): 0x00000000
  77. (10) r10 (/32): 0x00000000
  78. (11) r11 (/32): 0x00000000
  79. (12) r12 (/32): 0x00000000
  80. (13) sp (/32): 0xfffffffc
  81. (14) lr (/32): 0xffffffff
  82. (15) pc (/32): 0xfffffffe
  83. (16) xPSR (/32): 0x01000000
  84. (17) msp (/32): 0xfffffffc
  85. (18) psp (/32): 0x00000000
  86. (19) primask (/1): 0x00
  87. (20) basepri (/8): 0x00
  88. (21) faultmask (/1): 0x00
  89. (22) control (/2): 0x00
  90. (23) d0 (/64): 0x0000000000000000
  91. (24) d1 (/64): 0x0000000000000000
  92. (25) d2 (/64): 0x0000000000000000
  93. (26) d3 (/64): 0x0000000000000000
  94. (27) d4 (/64): 0x0000000000000000
  95. (28) d5 (/64): 0x0000000000000000
  96. (29) d6 (/64): 0x0000000000000000
  97. (30) d7 (/64): 0x0000000000000000
  98. (31) d8 (/64): 0x0000000000000000
  99. (32) d9 (/64): 0x0000000000000000
  100. (33) d10 (/64): 0x0000000000000000
  101. (34) d11 (/64): 0x0000000000000000
  102. (35) d12 (/64): 0x0000000000000000
  103. (36) d13 (/64): 0x0000000000000000
  104. (37) d14 (/64): 0x0000000000000000
  105. (38) d15 (/64): 0x0000000000000000
  106. (39) fpscr (/32): 0x00000000
  107. ===== Cortex-M DWT registers
  108.  
  109.  
  110. nrf5 mass_erase
  111. nRF52840-xxAA(build code: D0) 1024kB Flash, 256kB RAM
  112. Flash protection of this nRF device is not supported
  113. Failed to check chip's write protection
  114.  
  115.  
  116. flash erase_check 0
  117. successfully checked erase state
  118. Bank is erased
  119.  
  120.  
  121. flash write_image /home/pi/openocd-config/bootloader.hex
  122. Padding image section 0 at 0x00000b00 with 1280 bytes
  123. Flash write discontinued at 0x00025de8, next section at 0x000f4000
  124. SWD DPIDR 0x2ba01477
  125. Failed to write memory at 0x20001948
  126. Failed to write to nrf5 flash
  127. error writing to flash at address 0x00000000 at offset 0x00000000
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement