utzig commented on a change in pull request #2520:
URL: https://github.com/apache/mynewt-core/pull/2520#discussion_r590710373
##########
File path: hw/mcu/nxp/kinetis/src/hal_qspi.c
##########
@@ -37,62 +37,69 @@
#error QSPI_FLASH_SECTOR_COUNT must be set to the correct value in bsp
syscfg.yml
#endif
-uint32_t lut[FSL_FEATURE_QSPI_LUT_DEPTH] = {
- /* Seq0 :Quad Read */
- /* CMD: 0xEB - Quad Read, Single pad */
- /* ADDR: 0x18 - 24bit address, Quad pads */
- /* DUMMY: 0x06 - 6 clock cyles, Quad pads */
- /* READ: 0x80 - Read 128 bytes, Quad pads */
- /* JUMP_ON_CS: 0 */
- [0] = QSPI_LUT_SEQ(QSPI_CMD, QSPI_PAD_1, 0xEB, QSPI_ADDR, QSPI_PAD_4,
0x18),
- [1] = QSPI_LUT_SEQ(QSPI_DUMMY, QSPI_PAD_4, 0x06, QSPI_READ, QSPI_PAD_4,
0x80),
- [2] = QSPI_LUT_SEQ(QSPI_JMP_ON_CS, QSPI_PAD_1, 0x0, 0, 0, 0),
-
- /* Seq1: Write Enable */
- /* CMD: 0x06 - Write Enable, Single pad */
- [4] = QSPI_LUT_SEQ(QSPI_CMD, QSPI_PAD_1, 0x06, 0, 0, 0),
-
- /* Seq2: Erase All */
- /* CMD: 0x60 - Erase All chip, Single pad */
- [8] = QSPI_LUT_SEQ(QSPI_CMD, QSPI_PAD_1, 0x60, 0, 0, 0),
-
- /* Seq3: Read Status */
- /* CMD: 0x05 - Read Status, single pad */
- /* READ: 0x01 - Read 1 byte */
- [12] = QSPI_LUT_SEQ(QSPI_CMD, QSPI_PAD_1, 0x05, QSPI_READ, QSPI_PAD_1,
0x1),
-
- /* Seq4: Page Program */
- /* CMD: 0x02 - Page Program, Single pad */
- /* ADDR: 0x18 - 24bit address, Single pad */
- /* WRITE: 0x80 - Write 128 bytes at one pass, Single pad */
- [16] = QSPI_LUT_SEQ(QSPI_CMD, QSPI_PAD_1, 0x02, QSPI_ADDR, QSPI_PAD_1,
0x18),
- [17] = QSPI_LUT_SEQ(QSPI_WRITE, QSPI_PAD_1, 0x80, 0, 0, 0),
-
- /* Seq5: Write Register */
- /* CMD: 0x01 - Write Status Register, single pad */
- /* WRITE: 0x01 - Write 1 byte of data, single pad */
- [20] = QSPI_LUT_SEQ(QSPI_CMD, QSPI_PAD_1, 0x01, QSPI_WRITE, QSPI_PAD_1,
0x1),
-
- /* Seq6: Read Config Register */
- /* CMD: 0x15 - Read Config register, single pad */
- /* READ: 0x01 - Read 1 byte */
- [24] = QSPI_LUT_SEQ(QSPI_CMD, QSPI_PAD_1, 0x15, QSPI_READ, QSPI_PAD_1,
0x1),
-
- /* Seq7: Erase Sector */
- /* CMD: 0x20 - Sector Erase, single pad */
- /* ADDR: 0x18 - 24 bit address, single pad */
- [28] = QSPI_LUT_SEQ(QSPI_CMD, QSPI_PAD_1, 0x20, QSPI_ADDR, QSPI_PAD_1,
0x18),
-
- /* Match MISRA rule */
- [63] = 0
+#define AHB_BUFFER_SIZE MYNEWT_VAL(QSPI_FLASH_PAGE_SIZE)
+#define QSPI_HAS_CLR (defined(FSL_FEATURE_QSPI_SOCCR_HAS_CLR_LPCAC) && \
Review comment:
Fixed, thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]