Compile with HW_HAS_FLASH
Compile with HW_HAS_FLASH
I am working with building new firmware and have some questions about the HW_HAS_FLASH configuration object in "mpconfigboard.h". I have looked through the documentation with Google searches and am unable to find details on what this option is for. Is this related to the internal flash memory or an external IC? if an external IC where would I find compatible IC's and details on connections. If this is not an external IC related option, why would it cause long latency issues when enabled on a build. I am working with a custom board I designed and built with the f407vgt6 processor.
Re: Compile with HW_HAS_FLASH
The MICROPY_HW_HAS_FLASH is used here:
https://github.com/micropython/micropyt ... #L194-L196
The Flash module allows python code to access the internal flash blocks directly (as a block protocol). You can find the implementation of the Flash module in storage.c. But unless you instantiate a Flash object from your python code, that code should never be executed.
There is a constant called MICROPY_HW_FLASH_LATENCY which is defined in the mpconfigboard.h files. It determines the number of wait states that need to be used and IIRC it varies based on the processor clock speed and type. This applies to the internal flash.
If you have an separate external flash module connected, then presumably you'd be using the FMC module (for a parallel interface) or the SPI modules (for a serial interface). If you're using the the FMC module, then you'd need to setup all of the timing registers etc to match your flash module.
https://github.com/micropython/micropyt ... #L194-L196
The Flash module allows python code to access the internal flash blocks directly (as a block protocol). You can find the implementation of the Flash module in storage.c. But unless you instantiate a Flash object from your python code, that code should never be executed.
There is a constant called MICROPY_HW_FLASH_LATENCY which is defined in the mpconfigboard.h files. It determines the number of wait states that need to be used and IIRC it varies based on the processor clock speed and type. This applies to the internal flash.
If you have an separate external flash module connected, then presumably you'd be using the FMC module (for a parallel interface) or the SPI modules (for a serial interface). If you're using the the FMC module, then you'd need to setup all of the timing registers etc to match your flash module.