2013-11-30 11:05 PM
Hi guys,
I am new to STM8s discovery... I have done the following code: stm8/ ;mapping.asm exists ... segment 'rom' start bset $5011,#0;sets PD0 to input loop_main ldw X,#$FFFF loop_delay nop decw X jrne loop_delay bcpl $500F,#0; togle port to input/output jra loop_main end This will blink the led...at least it should... the problem is..it never blink :S In debug mode I tried to see where is the problem...and when I start debug...the PC starts in 0x6000 :S For what I understand it should start in 0x8080... Is there any chance to when we reset the board in CN1, it restart the PC, but the first instruction is a jra to 0x8080?? to start running the code?? Am'i thinking correct? In stvp I chosed the Motorola like binary file, and in program code I flashed the board... Thanks in advance Ps:What is Blank check??does the programmer write something in the flash or epromm?? regards tux2013-12-10 02:49 PM
2014-08-29 07:37 AM
Hi Tux,
I have a similar issue. When I start the debugger it too starts in 0x6000. I assume this has something to do with the bootloader since this memory space is reserved for the bootloader. But I don't have or want to use a bootloader at this time. I still have this problem. Did you ever get your problem resolved? Thanks. Take care, Kyle2015-06-05 04:12 PM
Hi,
Sorry for the delay.. yes I agree it have to do with bootloader.. when you make a reset by default the PC starts at 6000, if then runs a series of checks, that lasts for 1 second, if you enter in bootloader mode , it will start running bootloader reply ode protocol... But the strange thing is that , if you don't enter bootloader mode, it should, after that jump to 0x8000 which is the entry point for interrupt vectors.. you can disable bootloader mode, but then if you need it...it will be a mess, because if you don't have a way to change registers, you will not ne able to enter it again:( this is strange behavior.. One solution that I found that works is jumping to 0x8000 the interrupt vector table...but its strange because bootloader should by it self jump there..