RTM SDK QSPI watermark functions/QSPI example.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RTM SDK QSPI watermark functions/QSPI example.

1,523件の閲覧回数
Anonymous
適用対象外

S32 Design Studio for ARM 2018.R1 with Update 11.

Example project qspi_external_flash_s32k148 from "S32K1xx RTM SDK v3.0.0" (can't find a 3.0.2 example but "S32 Design Studio S32K1xx SDK RTM 3.0.2 Patch for SDK RTM 3.0.0" is installed). In file quadspi_hw_access.h.

static inline void QSPI_DRV_SetRxWatermark(QuadSPI_Type *baseAddr,
                                           uint8_t watermark)
{
    uint32_t regValue = (uint32_t)baseAddr->RBCT;
    regValue &= (uint32_t)(~(QuadSPI_RBCT_WMRK_MASK));
    regValue |= QuadSPI_RBCT_WMRK(watermark - 1U);
    baseAddr->RBCT = (uint32_t)regValue;
}
static inline void QSPI_DRV_SetTxWatermark(QuadSPI_Type *baseAddr,
                                           uint8_t watermark)
{
    uint32_t regValue = (uint32_t)baseAddr->TBCT;
    regValue &= (uint32_t)(~(QuadSPI_TBCT_WMRK_MASK));
    regValue |= QuadSPI_TBCT_WMRK(watermark);
    baseAddr->TBCT = (uint32_t)regValue;
}

Shouldn't both be "watermark - 1U"?

QSPI_DRV_Init() calls    

QSPI_DRV_SetTxWatermark(baseAddr, 2U);
QSPI_DRV_SetRxWatermark(baseAddr, 1U);

Is the TX watermark supposed to be 8 or 12 bytes?

ラベル(1)
タグ(4)
0 件の賞賛
返信
2 返答(返信)

1,373件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello mjoh,

The S32K1xx Reference Manual, rev.11 does not restrict the setting of the Buffer Watermarks.

The values in the driver were selected based on testing. 

Do you have any issue with the driver?

Thanks,

BR, Daniel

0 件の賞賛
返信

1,373件の閲覧回数
Anonymous
適用対象外

No issue, but still curious why one is/was

QuadSPI_RBCT_WMRK(watermark - 1U)
and the other

QuadSPI_TBCT_WMRK(watermark)

0 件の賞賛
返信