Dears,
I've succesfully recompiled and flashed your bootloader, and I got the first sw update from the UART working. I'm very happy with this, it's been really easy to make it running from scratch.
What I noticed so far, is that the first reprogramming seems to work fine, while trying to perform a further reprogramming brings problem, and the device become unusable.The second try seems to fail on program reprogramming as you can see from the log output:
Check Device...
Open COM29 serial port at 57600bd
Found: PIC32MX3xx_to_7xx w/512KB flash
Open HEX file: D:\Progetti\Firmware_REPO\BCAN\trunk\BCAN\BCAN.hex
Erasing Flash Memory...
Erase OK
Transferring Config Bytes...
Transferring flash...
Transferring boot memory...
Transferring program memory...
Transferring HEX successfull :-)
Close COM29 serial port
Check Device...
Open COM29 serial port at 57600bd
Found: PIC32MX3xx_to_7xx w/512KB flash
Open HEX file: D:\Progetti\Firmware_REPO\BCAN\trunk\BCAN\BCAN.hex
Erasing Flash Memory...
Erase OK
Transferring Config Bytes...
Transferring flash...
Transferring boot memory...
Transferring program memory...
no answer
ERROR: problem in writing flash memory!!!
Close COM29 serial port
I see this issue every time after the first successful try. Am I configuring the config bit badly?
This is how I've setup the config bit on the user program:
'#pragma config FPLLMUL = MUL_20, FPLLIDIV = DIV_5, FPLLODIV = DIV_1, FWDTEN = ON, WDTPS = PS4096, FSOSCEN = OFF
'#pragma config POSCMOD = HS, FNOSC = PRIPLL, FPBDIV = DIV_1, DEBUG = OFF, ICESEL = ICS_PGx1
Moreover,I would like to understand if there's the possibility to know if the user sw contained the flash is correct or not, and if not, simply hangup waiting for the new bootloader. This would help in case of empty eeprom, where only the bootloader is present, but also could give the possibility to recover a burned unit after a bad program.
Thank you for you great job,
Davide
Last edit: Davide Spazian 2014-01-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, It seems I got it working. I setup the configuration bits of my program in the bootloader(exactly the same), and deselcted the option "config bytes" from the pc application.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Davide.
Sorry for the inconvenience, I knew that config bytes writting on PIC32 didn't work, but I've forgotten to disable it from the PC software.
Thanks for the bug report!
Best regards,
Edorul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dears,
I've succesfully recompiled and flashed your bootloader, and I got the first sw update from the UART working. I'm very happy with this, it's been really easy to make it running from scratch.
What I noticed so far, is that the first reprogramming seems to work fine, while trying to perform a further reprogramming brings problem, and the device become unusable.The second try seems to fail on program reprogramming as you can see from the log output:
Check Device...
Open COM29 serial port at 57600bd
Found: PIC32MX3xx_to_7xx w/512KB flash
Open HEX file: D:\Progetti\Firmware_REPO\BCAN\trunk\BCAN\BCAN.hex
Erasing Flash Memory...
Erase OK
Transferring Config Bytes...
Transferring flash...
Transferring boot memory...
Transferring program memory...
Transferring HEX successfull :-)
Close COM29 serial port
Check Device...
Open COM29 serial port at 57600bd
Found: PIC32MX3xx_to_7xx w/512KB flash
Open HEX file: D:\Progetti\Firmware_REPO\BCAN\trunk\BCAN\BCAN.hex
Erasing Flash Memory...
Erase OK
Transferring Config Bytes...
Transferring flash...
Transferring boot memory...
Transferring program memory...
no answer
ERROR: problem in writing flash memory!!!
Close COM29 serial port
I see this issue every time after the first successful try. Am I configuring the config bit badly?
This is how I've setup the config bit on the user program:
'#pragma config FPLLMUL = MUL_20, FPLLIDIV = DIV_5, FPLLODIV = DIV_1, FWDTEN = ON, WDTPS = PS4096, FSOSCEN = OFF
'#pragma config POSCMOD = HS, FNOSC = PRIPLL, FPBDIV = DIV_1, DEBUG = OFF, ICESEL = ICS_PGx1
Moreover,I would like to understand if there's the possibility to know if the user sw contained the flash is correct or not, and if not, simply hangup waiting for the new bootloader. This would help in case of empty eeprom, where only the bootloader is present, but also could give the possibility to recover a burned unit after a bad program.
Thank you for you great job,
Davide
Last edit: Davide Spazian 2014-01-23
Ok, It seems I got it working. I setup the configuration bits of my program in the bootloader(exactly the same), and deselcted the option "config bytes" from the pc application.
Hello Davide.
Sorry for the inconvenience, I knew that config bytes writting on PIC32 didn't work, but I've forgotten to disable it from the PC software.
Thanks for the bug report!
Best regards,
Edorul