Programming SPI External Flash

bdoan

Well-known member
I am using a Teensy 4.1 as the "brains" of a product test fixture.

I need to program the bootloader code for the target board into a W25X40cl flash device.

The 4.1 will be interfacing with a Windows application to run the test sequence and will receive lines from an Interl .hex file for the programming.

Is there any sample code available (or at least the SPI Flash interface code) so I can build a device programmer function into the 4.1?
 
if understood MainPoint: Using USB_Host feature of a TestFixture T_4.1 to upload code to other Teensy's?

Not sure about how these two come together?
4.1 will be interfacing with a Windows application to run the test sequence and will receive lines from an Interl .hex
program the bootloader code for the target board into a W25X40cl flash device
The code is in the FLASH or coming from Host PC?

If MainPoint is correct where the .hex comes from should work either way

It seems that @PaulStoffregen created a USB_Host sketch that programmed a Teensy Device some time back? Never tested that code here and it may be as far back as T_3.6 timeframe?

Perhaps a search can locate that posting - or @PaulStoffregen or other can provide confirmation/pointer?
 
if understood MainPoint: Using USB_Host feature of a TestFixture T_4.1 to upload code to other Teensy's?

Not sure about how these two come together?


The code is in the FLASH or coming from Host PC?

If MainPoint is correct where the .hex comes from should work either way

It seems that @PaulStoffregen created a USB_Host sketch that programmed a Teensy Device some time back? Never tested that code here and it may be as far back as T_3.6 timeframe?

Perhaps a search can locate that posting - or @PaulStoffregen or other can provide confirmation/pointer?
The code is coming for an Intel Hex file -> transmitted to the Teensy over USB serial connection -> then decoded and programmed to the SPI flash device.

This is not a USB host application

Just looking for sample code to erase and program blocks of memory in a W25X40cl
 
Back
Top