View previous topic :: View next topic |
Author |
Message |
asherjackson
Joined: 27 Aug 2024 Posts: 1
|
Bootloader issues dsPIC33CH |
Posted: Tue Aug 27, 2024 1:34 am |
|
|
Hi,
I am trying to use the bootloader in a dsPIC33CH. My goal is to eventually update firmware of the MCU remotely.
For now I am testing with the bootloader, but I can't get it working. Does someone have an example to update firmware multiple times using the bootloader with for example UART communication? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19529
|
|
Posted: Tue Aug 27, 2024 3:30 am |
|
|
You say 'the bootloader'. You do understand there is a separate bootloader
for PCD?.
The bootloader is ex_pcd_bootloader.c
The example using this to load a basic program is ex_pcd_bootload.c
There are also examples using the aux segment, which I don't think your
chip has?. Also one using the alternative interrupt vector table, which
makes interrupt handling simpler and slightly faster.
Very important thing is that the program used to send the code _must_
have XON/XOFF handshaking enabled. Problem is that writing a segment
takes significant time, and the chip execution has to stop while this happens,
so the loader must be able to stop the comms during this time.
Also if the main code uses the same serial port, and you want to use
pin_select in the main code, you must have the fuse set to allow this
to be reprogrammed. NOIOL1WAY |
|
|
|