5966 views|17 replies

3218

Posts

5

Resources
The OP

Some questions about msp30f149bootloader [Copy link]

Since the latest project needs to use the MSP430F149 chip, a remote upgrade function is needed. I have a few questions about the bootloader. I hope friends who know more can answer them: 1: For the ASCII format characters received by the serial port, when writing to the flash, does it only write data according to the @ address? For example, the following app.txt @1100 31 40 00 0A 3C 40 00 02 3D 40 04 00 B0 12 80 11 B0 12 18 11 B0 12 9C 11 0A 12 0A 43 B2 40 80 5A 20 01 32 C2 03 43 B0 12 50 11 32 D2 F2 D0 03 00 36 00 F2 F0 FC 00 35 00 0A 43 01 3C 1A 53 3A 90 50 C3 FC 2B 0A 43 3A 90 50 C3 F3 2F 1A 53 FB 3F 0F 43 F2 C0 80 00 57 00 F2 40 88 00 58 00 E2 C3 02 00 3F 40 FF 00 01 3C 3F 53 0F 93 FD 23 E2 B3 02 00 F5 2F E2 C3 02 00 F2 40 88 00 58 00 30 41 0F 4C 0F 5D 03 3C CC 43 00 00 1C 53 0C 9F FB 23 30 41 92 53 00 02 82 63 02 02 00 13 30 40 A0 11 30 40 A4 11 FF 3F @F7EC 92 11 @F7FE 00 11 q When I receive the @ character, I set the flash address to 1100 and keep writing data such as 31 to FF 3F. When I encounter @F7EC, I directly switch the address and write 0x1192. When I encounter @F7FE, I write 0x1100. When I encounter q, I stop the flash write operation directly. I don’t know if I understand it correctly? The second question is about the secondary mapping of the interrupt vector of the app. Can I just modify the address in the app xcl file? For example: //-Z(CODE)INTVEC=FFE0-FFFF //-Z(CODE)RESET=FFFE-FFFF -Z(CODE)INTVEC=F7E0-F7FF //As the user's own virtual interrupt vector address corresponding to the bootloader -Z(CODE)RESET=F7FE-F7FF //User's own virtual program reset address I have seen some bootloader codes also add the following interrupt vector mapping code: /Interrupt vector table remapping //Oscillator failure #pragma vector=NMI_VECTOR __interrupt void NMI_ISR(void) { asm("br &0xF7FC"); } //TIMER1_A3 #pragma vector=TIMERB0_VECTOR __interrupt void TIMER1A0_ISR(void) { asm("br &0xF7FA"); } #pragma vector=TIMERB1_VECTOR __interrupt void TIMER1A1_ISR(void) { asm("br &0xF7F8"); } #pragma vector=COMPARATORA_VECTOR __interrupt void COMPARATORA_ISR(void) { asm("br &0xF7F6"); } #pragma vector=WDT_VECTOR __interrupt void WDT_ISR(void) { asm("br &0xF7F4"); }









This post is from Microcontroller MCU

Latest reply

Now the problem is, this serial port interrupt is also used in the bootloader, so how to judge whether to execute the jump instruction (to execute the serial port interrupt of the app) or the serial port interrupt program of the bootloader? Can a variable be used to select?  Details Published on 2016-4-27 22:15
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

1977

Posts

0

Resources
2
Don't know much about bootloda, but why do you want to remap the interrupt vectors?
This post is from Microcontroller MCU

Comments

Because the interrupt vector is a set, it needs to be remapped  Details Published on 2015-6-13 09:42

3218

Posts

5

Resources
3
bobde163 posted on 2015-6-6 23:32 I don't know much about bootloda, but why do we need to remap the interrupt vector?
Because the interrupt vector is a set, so we need to remap it
This post is from Microcontroller MCU
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

3218

Posts

5

Resources
4
Self-posting, boot has been successful, my above guesses have been verified to be correct.
This post is from Microcontroller MCU
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

134

Posts

3

Resources
5
I have also been studying the upgrade issue of 149 recently. Can you explain it in more detail? Or can you send me a copy of the upgrade file? han20140806@163.com

This post is from Microcontroller MCU

Comments

You need to do this by yourself. It is actually very simple. You can figure out a few core issues and you can do it. In fact, after you burn the txt file to the flash, jump the PC to the virtual reset interrupt address of the APP, and it will be successful.  Details Published on 2015-6-13 11:16

3218

Posts

5

Resources
6
hanwenli123 posted on 2015-6-13 10:33 I have also been studying the upgrade problem of 149 recently. Can you explain it in more detail, or send me a copy of the upgrade file?
You need to do it yourself. It is actually very simple. You can figure out a few core issues and you can get it done. In fact, after you burn the txt file to the flash, jump the PC to the reset interrupt address of the APP virtual, and it will be successful.
This post is from Microcontroller MCU
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

134

Posts

3

Resources
7
First, I don't understand the problem of flash address. I don't know how to determine the address and how to modify the .XCL file.
This post is from Microcontroller MCU

Comments

I have already answered it above  Details Published on 2016-2-26 21:11

1

Posts

0

Resources
8
Hello, I have a question about the bootloader. Is your interrupt remapping set from the beginning? If you don't use the serial port interrupt to accept updates, you should determine the register to get data from the cache to update. That will cause each serial port data to enter the serial port interrupt and jump to the interrupt vector address of the app you specified. My program will reset every time it jumps to it, causing me to be unable to continue accepting updates in the main program.
This post is from Microcontroller MCU

Comments

I suggest you reopen the thread to ask the question!  Details Published on 2016-2-26 21:14
I suggest you reopen the thread to ask the question!  Details Published on 2015-9-23 10:33

6054

Posts

88

Resources
9
muluoyesui posted on 2015-9-23 10:26 Hello, I have a question about the bootloader. Did you have interrupt remapping from the beginning? If you don't use serial port interrupt to accept updates, it should be the judgment...
I suggest you open a new thread to ask the question!
This post is from Microcontroller MCU

2

Posts

0

Resources
10
Hello, I am working on upgrading the 430 serial port program. Could you please send me a copy of your program? I would be grateful. 531334045@qq.com
This post is from Microcontroller MCU

3218

Posts

5

Resources
11
hanwenli123 posted on 2015-6-13 11:36 The first question I don’t understand is the flash address. I don’t know how to determine the address and how to modify the .XCL file
I have already answered it above
This post is from Microcontroller MCU
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

3218

Posts

5

Resources
12
muluoyesui posted on 2015-9-23 10:26 Hello, I have a question about the bootloader. Did you have interrupt remapping from the beginning? If you don't use the serial port interrupt to accept updates, it should be to determine the send...
Did you make a mistake in the address mapping?
This post is from Microcontroller MCU
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

8

Posts

0

Resources
13
May I ask the original poster, what should I do if I want to reuse the interrupt vector, because the interrupt is also needed in the bootloader.
This post is from Microcontroller MCU

Comments

I haven't tried it  Details Published on 2016-4-27 17:32

3218

Posts

5

Resources
14
anring posted on 2016-4-27 15:56 May I ask the original poster, what should I do if I want to reuse the interrupt vector, because the bootloader also needs to use the interrupt.
I haven't tried it
This post is from Microcontroller MCU
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

8

Posts

0

Resources
15
May I ask the original poster, after jumping the PC to the APP virtual reset interrupt address, how do I enter the interrupt in my bootloader itself?
This post is from Microcontroller MCU

Comments

There is only one set of physical interrupt vector addresses. Every time an interrupt comes, it will go to the physical interrupt vector address, and then go to your virtual interrupt vector address through your jump instruction.  Details Published on 2016-4-27 21:12

3218

Posts

5

Resources
16
anring posted on 2016-4-27 20:58 May I ask the original poster, after jumping the PC to the APP virtual reset interrupt address, how can I enter the interrupt in my bootloader?
There is only one set of physical interrupt vector addresses. Every time an interrupt comes, it will go to the physical interrupt vector address, and then go to your virtual interrupt vector address through your jump instruction.
This post is from Microcontroller MCU

Comments

Now the question is, this serial port interrupt is also used in the bootloader, so how to judge whether to execute the jump instruction (to execute the serial port interrupt of the app) or to execute the serial port interrupt program of the bootloader? Can a variable be used to select?  Details Published on 2016-4-27 22:15
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

8

Posts

0

Resources
17
wateras1 posted on 2016-4-27 21:12 There is only one set of physical interrupt vector addresses. Every time an interrupt comes, it will go to the physical interrupt vector address, and then through your jump instruction to your virtual interrupt vector address...
Now the problem is, this serial port interrupt is also used in the bootloader, so how to judge whether to execute the jump instruction (to execute the serial port interrupt of the app) or the serial port interrupt program of the bootloader? Can a variable be used to select?
This post is from Microcontroller MCU

Comments

It is best to use the polling method to receive data on the serial port. I did not use interrupts.  Details Published on 2016-4-27 22:57

3218

Posts

5

Resources
18
anring posted on 2016-4-27 22:15 Now the question is, the serial port interrupt is also used in the bootloader, so should it execute the jump instruction (to execute the serial port interrupt of the app) or...
It is best to use the polling method to receive data for the serial port, I did not use interrupts.
This post is from Microcontroller MCU
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目

Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>
    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list