[NEWS] Introducing MFS

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome.
0x3333
Posts: 51
Joined: Thu Mar 07, 2019 10:19 pm
Has thanked: 7 times
Been thanked: 4 times

Re: [NEWS] Introducing MFS

Postby 0x3333 » Tue Apr 16, 2019 1:45 am

I tested the LLD driver and it is working. Just a small modification to the address size from my last patch.

Patch attached.

I didn't test with MFS, just the functions:

Code: Select all

flashStartEraseSector
flashWaitErase
flashProgram
flashRead


I'll try MFS as soon as I set up a test case.
Attachments
driver_f1.diff.zip
(4.38 KiB) Downloaded 18 times

0x3333
Posts: 51
Joined: Thu Mar 07, 2019 10:19 pm
Has thanked: 7 times
Been thanked: 4 times

Re: [NEWS] Introducing MFS

Postby 0x3333 » Wed Apr 24, 2019 8:20 pm

Did you have time to check the patch?

I'd like to know if it would eventually be upstreamed, or I should keep a branch for this mod.

Thanks

User avatar
Giovanni
Site Admin
Posts: 12021
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 543 times
Been thanked: 455 times
Contact:

Re: [NEWS] Introducing MFS

Postby Giovanni » Wed Apr 24, 2019 11:15 pm

I will look into it.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 12021
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 543 times
Been thanked: 455 times
Contact:

Re: [NEWS] Introducing MFS

Postby Giovanni » Sun Apr 28, 2019 9:52 am

Hi,

I merged the patch as-is. Question, does it support F105/107 too?

Giovanni

0x3333
Posts: 51
Joined: Thu Mar 07, 2019 10:19 pm
Has thanked: 7 times
Been thanked: 4 times

Re: [NEWS] Introducing MFS

Postby 0x3333 » Mon Apr 29, 2019 12:33 pm

Great news!

I tested only in F103, but I followed strictly the PM0075Programming manual, which states that:
This programming manual describes how to program the Flash memory of STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and STM32F107xx microcontrollers.


Also, I updated the os/hal/ports/STM32/STM32F1xx/stm32_registry.h file with the page size/length of all F1 devices.

I checked with the programming manual, and High Density devices have 1 bank with 2Kb pages, which my patch is incorrect. I'll create another patch with some changes to fix those devices.
Last edited by 0x3333 on Mon Apr 29, 2019 1:12 pm, edited 1 time in total.

User avatar
Giovanni
Site Admin
Posts: 12021
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 543 times
Been thanked: 455 times
Contact:

Re: [NEWS] Introducing MFS

Postby Giovanni » Mon Apr 29, 2019 12:52 pm

OK thanks, need to update the other platform.mk then.

Giovanni

0x3333
Posts: 51
Joined: Thu Mar 07, 2019 10:19 pm
Has thanked: 7 times
Been thanked: 4 times

Re: [NEWS] Introducing MFS

Postby 0x3333 » Mon Apr 29, 2019 2:28 pm

I checked all datasheets, and XL devices have a separated programming manual, PM0068, which I have no time to read now to check for compatibility, so I prefer to say it is not compatible. In the future, I'll check, probably it is the same.

Here is a patch with some minor fixes, I externalized to the registry the page size, which was hardcoded in the driver.

Did you added an error for efl_lld_start_erase_all when device cannot be erased? Currently I'm returning FLASH_ERROR_HW_FAILURE, but you said would add an different error(Here)

Should we allow whole device erase? They have a way to mass erase the device, but it would erase the program itself, I don't know if this should be a possibility, as the program can run from RAM.

If you believe we should add it, I'll create a patch.
Attachments
driver_f1.zip
(994 Bytes) Downloaded 12 times

User avatar
Giovanni
Site Admin
Posts: 12021
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 543 times
Been thanked: 455 times
Contact:

Re: [NEWS] Introducing MFS

Postby Giovanni » Sun May 19, 2019 1:52 pm

Merged and added the new error code FLASH_ERROR_UNIMPLEMENTED.

Giovanni


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 1 guest