17bit or 25bit spi frame using Non blocking transfer function

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

17bit or 25bit spi frame using Non blocking transfer function

410 Views
iann
Contributor III

Hi All,

A while ago I had a problem interfacing to a device using a 9 or 10 bit address word (previous thread 17bit or 25bit spi frame using LPC546xx family ) which was solved with a change to the sdk and an extra function to change the bit width which worked well when using the spi blocking functions.

status_t SPI_ChangeTransferWidth(SPI_Type *base, spi_data_width_t datawidth){
    uint32_t instance;
    
    instance  = SPI_GetInstance(base);
    /* store configuration */
    g_configs[instance].dataWidth = datawidth;
}

However we're now moving into production code using the non blocking functions for spi and these ignore the change to the width is there a way to achieve the same?

Kind regards

Ian

Labels (2)
0 Kudos
1 Reply

380 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @iann,

Looking at the API, I saw that you're saving the configuration for the data width in the temporal structure and not directly in the register. Try writing directly to the FIFOWR register.

Best Regards,

Alexis Andalon

0 Kudos