This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Board can't boot up without debug

Other Parts Discussed in Thread: HALCOGEN

Hello,

My team has developed a board based on RM48L952ZWT microcontroller, and we're using our own start up code.

Whenever I try to debug my code everything works properly. I can restart it, reset it, and everything works without any problems. The problem comes when I remove power from the board and then plug it back again. It sets de nError pin and my code doesn't boot up. In order to test this I programmed my board using halcogen and put a dummy application in it (infinite loop) and I can see that everything works properly.

Just in case I also tested my code in the RM48HDK and I can see that sometimes it works. If I turn it off WITH the debugging cable connected, my application works, if I do the same without the debugger plugged in it doesn't work.

This is obviously a firmware problem, I must be configuring something wrong, but I have no idea what. I'll post my code as soon as I clean it up and remove proprietary code.

  • Hello:

    I'll wait for your code to check it out. In the mean time, can you connect to your device after the nError pin is set and read the ESM Status registers to check the reported error?

    Thank you,

    Enrique
  • Sorry for taking such a long time to answer your reply. I found my mistake 10 minutes after I posted my question. It was a really dumb mistake. I was making a call to init the VFP module and at the beginning of the function I was doing a

    smfd sp!, {r0}

    Which is ok IF THE STACK POINTER AND REGISTERS HAVE ALREADY BEEN INITIALIZED. As I was following the Initialization manual, and it stated that the VFP should be the first thing initialized I did it, but I didn't think about the stack pointer. After noticing this I changed the location of the initVFP() function. but I could've also removed the stmfd instruction (and its analog instruction) and it also would've worked ok.
     


    It was  bug inserted by me in the end, like most times. Sorry for wasting your time, and again, sorry for making you wait so lonmg for a reply