Hi all,
I am using Pic16F15324 with Internal Clock at 32MHz ( IDE 7.2.0 ).
I did some test at first by doing classic LED Blinking and that works
Thanks to Janni to solve trouble on UART and main application is working well. Now i need to develop bootloader via UART. To do that i am using bootloader for PIC16 provided in example library. As you know this bootloader has beed defined for flashing EEROM not Flash Mry. Anyway concept is more or less similar and i am readapting it to FLASH mry instead of EEROM management.
A trouble occured : Transfert per 4 words seems don't match with correct MRY address. Tansfert seems be correct but DATA are not where they must be.
In attachment a ZIP file of the project including "MRY_Mapping" after complete Flash ( i uploaded MRY by using Pickit3 ). I have Flashing/uploaded my own Bootloader software.
Thanks in advance for support,
Best regards.
Pic16F15324 Bootloader(MikroBootloader tool)
Pic16F15324 Bootloader(MikroBootloader tool)
- Attachments
-
- Pic16F15324_Bootloader.zip
- (104.17 KiB) Downloaded 124 times
Re: Pic16F15324 Bootloader(MikroBootloader tool)
This processor's flash is arranged in rows of 32-words so erasing and writing has to be done in blocks of this size.
Re: Pic16F15324 Bootloader(MikroBootloader tool)
hello Janni,
Nice to reading you.
Could you confirm that Flash_Erase and Flash Write for PIC16 from Flash library are not usefull for doing my bootloader? Best way that would be to use Flash_Erase_Write function but this one is dedicated for PIC18.
I read in Datasheet to work in 32 words in row like you said and i think i will need to develop an ASM subsroutine for ERASE and WRITE like described in chapter 13.0. It is right or maybe something more or less close what i need is already existing?
Thanks.
Nice to reading you.
Could you confirm that Flash_Erase and Flash Write for PIC16 from Flash library are not usefull for doing my bootloader? Best way that would be to use Flash_Erase_Write function but this one is dedicated for PIC18.
I read in Datasheet to work in 32 words in row like you said and i think i will need to develop an ASM subsroutine for ERASE and WRITE like described in chapter 13.0. It is right or maybe something more or less close what i need is already existing?
Thanks.
Re: Pic16F15324 Bootloader(MikroBootloader tool)
These functions should work. I had a look at them and Flash_Write is adjusted to row of 32 words write. One caveat is that both functions may be dangerous as they call a routine that enables interrupts (though it was pointed out years ago, this quirk returns with every new processor implemented ). Theoretically, all interrupts are disabled at reset for this processor but it's best to make sure and disable them all manually (clear INTCON and PIEx registers).axem wrote:Could you confirm that Flash_Erase and Flash Write for PIC16 from Flash library are not usefull for doing my bootloader?
Re: Pic16F15324 Bootloader(MikroBootloader tool)
Thanks Janni,
To be honest i am not sure that i have well understood your answer. Can i use function dedicated to PIC18 like Flash_erase_write_64 or others Flash functions for PIC18 on my Pic16F15324? Or just stay focused on Flash functions dedicated to Pic16F?
I am not an expert of Pic and i am little bit worried for doing this bootloader but i need one by using serial transfert. Maybe i should use another one developped by other person or company. Any idea?
Anyway i will try to do according your feedback and hope you will continue to advice me.
Best regards.
To be honest i am not sure that i have well understood your answer. Can i use function dedicated to PIC18 like Flash_erase_write_64 or others Flash functions for PIC18 on my Pic16F15324? Or just stay focused on Flash functions dedicated to Pic16F?
I am not an expert of Pic and i am little bit worried for doing this bootloader but i need one by using serial transfert. Maybe i should use another one developped by other person or company. Any idea?
Anyway i will try to do according your feedback and hope you will continue to advice me.
Best regards.
Re: Pic16F15324 Bootloader(MikroBootloader tool)
When you choose the PIC16F15324 processor, the IDE displays available library functions in Library Manager. And I meant these functions, namely Flash_Erase and Flash_Write. There's no need to search for PIC18 functions - and they're not compatible, anyway.
If you find ready to use bootloader then it'll be certainly easier for you - it does not even have to be written for mE compilers as it's usually a separate program that loads a hex file. Maybe Microchip has something available.Maybe i should use another one developped by other person or company.