Hello
I am not long working with arm and I prepared a bootloader for TM4C1290NCPDT and I would like to protect so there are no way to write by mistake even if I want to change could be nice to only be able to change the bootloader with JTAG. after write that part of code I could not even program again the arm .. even I tried doing the the unlock sequence and did not work again the arm! if somebody can give me a hand I will be really thankfully.
MPURegionSet(0, 0,
MPU_RGN_SIZE_64K |
MPU_RGN_PERM_EXEC |
MPU_RGN_PERM_PRV_RO_USR_RO |
MPU_RGN_ENABLE);
//MPUIntRegister(protection_violation_occur);
//MPUIntRegister(void (*ConfigInit)(void));
IntEnable(FAULT_MPU);
/*************************/
void
protection_violation_occur(void)
{
UART0BlockingWrite ("R", 1);
}
/**************************/
;;*****************************************************************************
;;
;; The minimal vector table for a Cortex-M3 processor.
;;
;;*****************************************************************************
Vectors:
.ref __STACK_TOP
.word __STACK_TOP ;; Offset 00: Initial stack pointer
.if $$defined(RAM_MODE)
.word ResetISR - 0x20000000 ;; Offset 04: Reset handler
.word NmiSR - 0x20000000 ;; Offset 08: NMI handler
.word FaultISR - 0x20000000 ;; Offset 0C: Hard fault handler
.else
.word ResetISR ;; Offset 04: Reset handler
.word NmiSR ;; Offset 08: NMI handler
.word FaultISR ;; Offset 0C: Hard fault handler
.endif
.word protection_violation_occur ;; Offset 10: MPU fault handler
.word IntDefaultHandler ;; Offset 14: Bus fault handler
.word IntDefaultHandler ;; Offset 18: Usage fault handler
.word 0 ;; Offset 1C: Reserved
.word 0 ;; Offset 20: Reserved
.word 0 ;; Offset 24: Reserved
.word 0 ;; Offset 28: Reserved