1

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.

  • I was using MSP430F5438A and has similar issues. I was trying to access internal Flash and did some read/write to wrong memory address which was outside of flash address range. Look for similar issue if applicable. – Sunil Shahu Mar 09 '15 at 15:14
  • We are using External flash for storing data (i2c) but Not using the internal flash. – Feroze Mohamed Mar 10 '15 at 13:16

2 Answers2

2

@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 :)

1

"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.)

CL.
  • 173,858
  • 17
  • 217
  • 259
  • is there a possible method that I can isolate the issue ? any idea will help me. because i have been working on this issue for so long that I cant think of ideas. – Feroze Mohamed Mar 10 '15 at 13:19
  • Sprinkle `globalExecuting = 12345;` all over your code, with unique values. After the reset, check which was the last one. – CL. Mar 10 '15 at 14:38
  • This is what I understood: I will add a Global Variable all over my code with random values. And when the controller RESETs i will check the value of the Variable to isolate the Function that is causing the RESET. What I did NOT understand: How will i check the variable value AFTER the reset ? Assumption: I will need to be printing the value over UART and later observe the value that was printed JUST BEFORE THE RESET. – Feroze Mohamed Mar 11 '15 at 09:04
  • The reset does not clear memory. However, the normal C startup code clears or initializes all static variables, so you have to write to some otherwise unused memory, or use something like `__noinit`. – CL. Mar 11 '15 at 09:23
  • Thank you i wasn't aware of '__no_init' that's a new thing i learnt. thank you . i will try this. – Feroze Mohamed Mar 11 '15 at 10:11