Guest User

Untitled

a guest
Jan 23rd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. R4_20001368 R5_00000001 R6_00000338 R7_00000020
  2. R8_00000020 R9_2001bcc8 R10_200128cc R11_0043d3a9
  3. R0_402e0a00 R1_5a03380b R2_5a033800 R3_20000067
  4. R12_200129cc LR_0043320b PC_2000006a PSR_010f0000
  5.  
  6. SHCSR: 0x00000000
  7. CFSR: 0x00008600
  8. HFSR: 0x40000000
  9. DFSR: 0x00000000
  10. MMFAR: 0x402e0a08
  11. BFAR: 0x402e0a08
  12. AFSR: 0x00000000
  13.  
  14. 004331d4 <efc_perform_command>:
  15. 4331d4: f1a1 030e sub.w r3, r1, #14
  16. 4331d8: 2b01 cmp r3, #1
  17. 4331da: b537 push {r0, r1, r2, r4, r5, lr}
  18. 4331dc: d91d bls.n 43321a <efc_perform_command+0x46>
  19. 4331de: f3ef 8310 mrs r3, PRIMASK
  20. 4331e2: fab3 f383 clz r3, r3
  21. 4331e6: 095b lsrs r3, r3, #5
  22. 4331e8: 9301 str r3, [sp, #4]
  23. 4331ea: b672 cpsid i
  24. 4331ec: f3bf 8f5f dmb sy
  25. 4331f0: 4c0b ldr r4, [pc, #44] ; (433220 <efc_perform_command+0x4c>)
  26. 4331f2: 2300 movs r3, #0
  27. 4331f4: 7023 strb r3, [r4, #0]
  28. 4331f6: 4b0b ldr r3, [pc, #44] ; (433224 <efc_perform_command+0x50>)
  29. 4331f8: 9d01 ldr r5, [sp, #4]
  30. 4331fa: ea03 2202 and.w r2, r3, r2, lsl #8
  31. 4331fe: f042 42b4 orr.w r2, r2, #1509949440 ; 0x5a000000
  32. 433202: b2c9 uxtb r1, r1
  33. 433204: 4311 orrs r1, r2
  34. 433206: 4b08 ldr r3, [pc, #32] ; (433228 <efc_perform_command+0x54>)
  35. 433208: 4798 blx r3
  36. 43320a: b125 cbz r5, 433216 <efc_perform_command+0x42>
  37. 43320c: 2301 movs r3, #1
  38. 43320e: 7023 strb r3, [r4, #0]
  39. 433210: f3bf 8f5f dmb sy
  40. 433214: b662 cpsie i
  41. 433216: b003 add sp, #12
  42. 433218: bd30 pop {r4, r5, pc}
  43. 43321a: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff
  44. 43321e: e7fa b.n 433216 <efc_perform_command+0x42>
  45. 433220: 20001368 .word 0x20001368
  46. 433224: 00ffff00 .word 0x00ffff00
  47. 433228: 20000067 .word 0x20000067
  48.  
  49. 20000066 <efc_perform_fcr>:
  50. 20000066: b082 sub sp, #8
  51. 20000068: 6041 str r1, [r0, #4]
  52. 2000006a: 6883 ldr r3, [r0, #8]
  53. 2000006c: 9301 str r3, [sp, #4]
  54. 2000006e: 9b01 ldr r3, [sp, #4]
  55. 20000070: 07db lsls r3, r3, #31
  56. 20000072: d5fa bpl.n 2000006a <efc_perform_fcr+0x4>
  57. 20000074: 9801 ldr r0, [sp, #4]
  58. 20000076: f000 000e and.w r0, r0, #14
  59. 2000007a: b002 add sp, #8
  60. 2000007c: 4770 bx lr
  61.  
  62. /**
  63. * brief Perform the given command and wait until its completion (or an error).
  64. *
  65. * note Unique ID commands are not supported, use efc_perform_read_sequence.
  66. *
  67. * param p_efc Pointer to an EFC instance.
  68. * param ul_command Command to perform.
  69. * param ul_argument Optional command argument.
  70. *
  71. * note This function will automatically choose to use IAP function.
  72. *
  73. * return 0 if successful, otherwise returns an error code.
  74. */
  75. uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
  76. uint32_t ul_argument)
  77. {
  78. uint32_t result;
  79. irqflags_t flags;
  80.  
  81. /* Unique ID commands are not supported. */
  82. if (ul_command == EFC_FCMD_STUI || ul_command == EFC_FCMD_SPUI) {
  83. return EFC_RC_NOT_SUPPORT;
  84. }
  85.  
  86. flags = cpu_irq_save();
  87. /* Use RAM Function. */
  88. result = efc_perform_fcr(p_efc,
  89. EEFC_FCR_FKEY_PASSWD | EEFC_FCR_FARG(ul_argument) |
  90. EEFC_FCR_FCMD(ul_command));
  91. cpu_irq_restore(flags);
  92. return result;
  93. }
  94.  
  95.  
  96. /**
  97. * brief Perform command.
  98. *
  99. * param p_efc Pointer to an EFC instance.
  100. * param ul_fcr Flash command.
  101. *
  102. * return The current status.
  103. */
  104. __no_inline
  105. RAMFUNC
  106. uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr)
  107. {
  108. volatile uint32_t ul_status;
  109.  
  110. p_efc->EEFC_FCR = ul_fcr;
  111. do {
  112. ul_status = p_efc->EEFC_FSR;
  113. } while ((ul_status & EEFC_FSR_FRDY) != EEFC_FSR_FRDY);
  114.  
  115. return (ul_status & EEFC_ERROR_FLAGS);
  116. }
Add Comment
Please, Sign In to add comment