AnsweredAssumed Answered

K82 : qspi_polling example

Question asked by Eugene Hiihtaja on Jul 29, 2019
Latest reply on Aug 23, 2019 by Jing Pan

Hello !


I would like to write data to NOT type of memory in small chunks 4-16 bytes long.


I'm looking example qspi_polling in latest SDK and can see the next implementation of function for write complete page :


/* Program page into serial flash using QSPI polling way */
void program_page(uint32_t dest_addr, uint32_t *src_addr)

/* First write some data into TXFIFO to prevent from underrun */
QSPI_WriteBlocking(EXAMPLE_QSPI, src_addr, FSL_FEATURE_QSPI_TXFIFO_DEPTH * 4);  // 64 bytes ?


/* Start the program */
QSPI_ExecuteIPCommand(EXAMPLE_QSPI, 16U);

leftLongWords = FLASH_PAGE_SIZE - 16 * sizeof(uint32_t);

QSPI_WriteBlocking(EXAMPLE_QSPI, src_addr, leftLongWords);



What it means on practice ?

Can it be so than usage of QSPI features limits minimal data chunk to 64 bytes  ( 32 bytes ) ?


And if I would like to write data by small chunks, I should use just SPI driver and NOR  memory driver ?


It looks like for me that usage of QSPI and EDMA bring limitations for size of data chunks and for my case

it is little bit problematic to use those.


How long can be minimal data chunk in case of QSPI and EDMA usage ?


I can use minimal possible buffer and fill extra bytes with 0xFF for avoid writing. Some data alignment can be kept as well.