cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 4

SuRa_2245351
New Contributor II

I have written basic code for reading x,y and z axis data from ADXL362 accelerometer using SPI protocol.Following are the problems I am facing while using SPI protocol with PSOC4 BLE ki(CY8C4247LQI-BL483):

1.when SPI is used in Byte mode with Rx buffer size set more than 16, then SPI won't work and data is not received from ADXL362. If Rx buffer size is less than or equal to sixteen than program works and data is received.

2.If I change pin configuration as mentioned below in the same program then SPI won't work even if the Rx buffer size is less than or equal to 16.

P4.0=SCB1_SPI_MOSI[0]

P4.1=SCB1_SPI_MISO[0]

P5.0=SCB1_SPI_SS0[0]

P5.1=SCB1_SPI_SCLK[0]

I have attached code below please help.

0 Likes
1 Solution
NoriakiT_91
Employee

The USB block has 16 bytes of hardware FIFO.  So, if the RX buffer size is set more than sixteen, the SPI_Master component provides a software FIFO code using interrupts.

You call the function SingleByteWrite() using SPI APIs from main() prior to invoking CyGlobalIntEnable.  These SPI APIs would not work because all interrupts are disabled.  Please try to move the CyGlobalIntEnable line before the SingleByteWrite() function.

I don't know the reason of the issue number 2.

Regards,

Noriaki

View solution in original post

0 Likes
2 Replies