Feroze Mohamed
Feroze Mohamed

Reputation: 145

MSP430 Random Resets with 'Security Violation (BOR)'

I am facing RANDOM controller resets and the 'SYSRSTIV' register gives value '0x0A' which means 'Security Violation (BOR)' according to user's guide. I searched many forums and found few topics related to the issue but that didnt help.

Details:

Controller used : MSP430F6634

Issue: Random Reboots

Assumptions

> Nested ISR : But this is not the case as MSP430 by default disables Global Interrupts while in ISR and i made sure i am not enabling

> WatchDog Timer (WDT) : and this is not the case here either as WDT results in 'SYSRSTIV' register reading a value of 0x18

> Stack Overflow : This was my final assumption, but this doesnt seem to be the case either as i printed the Stack Pointer continuously to check if it went beyond the limts, and this didnt happen.

> DMA Register : Found similar issue in TI forums suggesting DMA register handling, DMA is only used in USB in our project and Disabling USB completely didn't help either

Very little is documented in the Datasheet and User's manual and TI customer support hasn't been helpful so far. I am struggling with this issue from 3 weeks and i couldnt resolve it.

Please help me.

Thanks in advance.

Upvotes: 1

Views: 1430

Answers (2)

Feroze Mohamed
Feroze Mohamed

Reputation: 145

@CL. Thank you for your guidance, that was really fruitful.

I used the __no_init and logged the last function that it was in Before the Reset, however I couldn't conclude with this, so i created an ARRAY using __no_init and logged last 200 functions/places it had been before the RESET and i was able to PINPOINT the issue today. (it was a really long wait)

The reason was :

I wass reading the data from an array and calculating CRC, due to data-overrun I was getting wrong length (negative value) and pointer continued reading ENTIRE RAM, DATA and CODE memories and finally ended up at BSL memory before i got the RESET.

One query I still have is:

1. If i was ONLY reading the data and not manipulating/overwriting the info at those locations, Why was I getting Security Violation.

2. and Why did i get RESET only when I read the value at the pointer location 0x1010 (BSL memory) and not at any other locations like Code Memory etc. also BSL memory starts from 0x1000 but the RESET occurred only after the pointer reached 0x1010 and NO Reset from 0x1000 to 0x100F . I am curious.

@CL. Thank you once again :)

Upvotes: 2

CL.
CL.

Reputation: 180230

"Security violation" means that your code tried to access the protected memory region of the BSL.

This can happen with wrong DMA programming, but in your case it's more likely that you're using a wrong pointer. (This might be a consequence of memory corruption caused by some other wrong pointer.)

Upvotes: 1

Related Questions