Search found 7 matches

by AndreasB
Tue May 21, 2019 7:37 am
Forum: Other Boards
Topic: [STM32F412RG] porting micropython flash memory problems
Replies: 5
Views: 3480

Re: [STM32F412RG] porting micropython flash memory problems

I recently did the F413 port. Unless you need Ethernet consider using it instead, or try using it as a starting point instead of F411. It needed a few changes to the port source files, not just a custom config. For example the generic F4 startup file does not support some interrupt vectors like SPI...
by AndreasB
Mon May 20, 2019 2:05 pm
Forum: Other Boards
Topic: [STM32F412RG] porting micropython flash memory problems
Replies: 5
Views: 3480

Re: [STM32F412RG] porting micropython flash memory problems

oke i got it fixed

Code: Select all

STATIC byte flash_cache_mem[0x10000] __attribute__((aligned(4))); // 16k
#define CACHE_MEM_START_ADDR (&flash_cache_mem[0])
#define FLASH_SECTOR_SIZE_MAX (0x10000) // 16k max due to size of cache buffer
this works now
by AndreasB
Mon May 20, 2019 1:55 pm
Forum: Other Boards
Topic: [STM32F412RG] porting micropython flash memory problems
Replies: 5
Views: 3480

Re: [STM32F412RG] porting micropython flash memory problems

In order to use 64k of one of the 64k flash blocks, you'll need to increase the size of flash_cache_mem from 16k to 64k. oke how should i go about doing that because that happens to be the part of the code i don't understand (i coppied it from the f411) STATIC byte flash_cache_mem[0x4000] __attribu...
by AndreasB
Mon May 20, 2019 12:52 pm
Forum: Other Boards
Topic: [STM32F412RG] porting micropython flash memory problems
Replies: 5
Views: 3480

[STM32F412RG] porting micropython flash memory problems

Hi, I am currently porting micropython to a custom board using a STM32F412RG. the reason of using this chip is the larger flash and ram capacity compared to the STM32F411RE. I have gotten so far as succesfully flashing a build to the board but now i am running into problems with the storage. the boa...
by AndreasB
Fri Apr 19, 2019 8:39 am
Forum: MicroPython pyboard
Topic: code in internal flash and mounting sd card as usb mass storage
Replies: 8
Views: 7118

Re: code in internal flash and mounting sd card as usb mass storage

I was already looking into the c code to see if i could change it there. I think i have got it working the way i wanted by editing the main.c original at line 653: #if MICROPY_HW_ENABLE_USB // if the SD card isn't used as the USB MSC medium then use the internal flash if (pyb_usb_storage_medium == P...
by AndreasB
Thu Apr 18, 2019 3:07 pm
Forum: MicroPython pyboard
Topic: code in internal flash and mounting sd card as usb mass storage
Replies: 8
Views: 7118

Re: code in internal flash and mounting sd card as usb mass storage

I have though about that.
that would indeed mount the sd card and run the main from /flash
but i would still have the boot code on the sd card.
i actually don't want to have any code on the sd card as i do not want the code to be end-user accessible.
by AndreasB
Thu Apr 18, 2019 1:12 pm
Forum: MicroPython pyboard
Topic: code in internal flash and mounting sd card as usb mass storage
Replies: 8
Views: 7118

code in internal flash and mounting sd card as usb mass storage

hi, I am attempting to mount the sdcard (if present) so it can be used to store logging data. but i want the code to be on the internal flash. i want the sd card to be accessible through the usb connection as a mass storage device. i have been able to put the code on the flash and execute it even wi...