Recently I had bought an Olimex SAM7X256 board, one of the latests dev boards they launched. I turned it on when arrived and everything works fine (at least that is what it seems: it beeps on joystick movement/press, the LCD shows something, etc), but when I try to develop something with it, as simple as turn on/off the backlight (pin PIOB20), the program execution simply jumps everywhere, and sometimes the board restarts the internal program.
I had checked with two different wiggler JTAG OCD’s I have, I’m using IAR KS, the download and RAM remaping are working fine, the watchdog and the AIC seem to be well programmed to reset values, but I still have not a clue what is going on.
Can somebody help me a little? Have somebody similar problems than I with this board? It seems to me that I left something in the program.
Thanks for your imput. I will try to give you more information, but since I don’t have the code I wrote at hand, I can post it. Probably later or tomorrow.
It seems that everything is downloaded OK, since I had checked the ‘Verify download’ option in the debugger options window.
Also I had used the JTAG with another DIY board for SAM7S64 I have with success. In fact, I have two JTAG wiggler clones that work both OK with SAM7S64, while they both do the same with the Olimex board.
I only had tried with my own code, not with demo programs, but I will try them when I have time (this weekend). I didn’t try to flash anything yet.
My code only turns on and off the backlight, so it has an init procedure that inits PIOB, and in the main I switch it on and off.
When I run the program to main(), I expect that everything should be fine and the startup code fine. The scripts for the JTAG download work fine. But when I jump to the init code for the PIOB, at a random line, the PC jumps back to the asm startup code (the Cstartup_SAM7.C file) and then loops there.
If I do a ‘go to cursor’ then ramdomly it works or i doesn’t work (it remains ‘working’). When it works and I do step by step, then randomly also goes to the startup code again, at a random lines. While it still goes step by step correctly, the assignements I do to init the PIOB registers doesn’t change this registers.