完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,大家好,
我是STM8s发现的新手...... 我做了以下代码: STM8 / ; mapping.asm存在... 细分'rom' 开始 bset $ 5011,#0;将PD0设置为输入 loop_main ldw X,#$ FFFF loop_delay NOP decw X. jrne loop_delay bcpl $ 500F,#0;将端口转换为输入/输出 jra loop_main 结束 这会使LED闪烁......至少它应该...... 问题是......从不眨眼:S 在调试模式下,我试着看看问题出在哪里......当我开始调试时...... PC从0x6000开始:S 据我所知,它应该从0x8080开始...... 有没有机会当我们在CN1重置电路板时,它会重新启动电脑,但是第一条指令是jra到0x8080 ??开始运行代码?? Am'i的想法是否正确? 在stvp我选择摩托罗拉就像二进制文件一样,在程序代码中我闪现了板子...... 提前致谢 Ps:什么是空白检查?程序员在flash或epromm中写了什么? 问候 晚礼服 以上来自于谷歌翻译 以下为原文 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 tux |
|
相关推荐
3个回答
|
|
有什么帮助吗?请..
提前致谢 问候 晚礼服 以上来自于谷歌翻译 以下为原文 any help?please.. thanks in advance regards tux |
|
|
|
嗨Tux,
我有一个类似的问题。当我启动调试器时,它也从0x6000开始。我假设这与引导加载程序有关,因为这个内存空间是为引导加载程序保留的。但是我目前没有或者想要使用引导加载程序。我还有这个问题。你有没有解决你的问题?谢谢。小心点,凯尔 以上来自于谷歌翻译 以下为原文 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, Kyle |
|
|
|
嗨,
抱歉耽搁了.. 是的我同意它与bootloader有关.. 当你默认重置时,PC启动为6000,如果然后运行一系列检查,持续1秒,如果你进入bootloader模式,它将开始运行bootloader reply ode protocol ... 但奇怪的是,如果你没有进入bootloader模式,它应该在跳转到0x8000之后,这是中断向量的入口点。 你可以禁用引导加载程序模式,但如果你需要它...它将是一个烂摊子,因为如果你没有办法改变寄存器,你将无法再次输入:( 这是奇怪的行为.. 我找到的一个解决方案是跳转到0x8000的中断向量表...但是奇怪的是因为bootloader应该由它自己跳转到那里.. 以上来自于谷歌翻译 以下为原文 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.. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2730 浏览 1 评论
3239 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1808 浏览 1 评论
3647 浏览 6 评论
6035 浏览 21 评论
1337浏览 4评论
197浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
442浏览 2评论
STM32处理增量式编码器Z信号如何判断中断是正转的还是反向转的?
273浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 22:11 , Processed in 1.010866 second(s), Total 80, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号