AnsweredAssumed Answered

Strange SPI behaviour in LPC8N04 driver?

Question asked by mrunal.ahirrao@alpha-ict.in on Aug 8, 2018

I am working with SPI of LPC8N04. For it I downloaded the Board support package and from that I got the drivers for SPI. And in the ssp_8Nxx.c file there is the 

uint32_t Chip_SSP_WriteFrames_Blocking(LPC_SSP_T *pSSP, uint8_t *buffer, uint32_t buffer_len)

 

And I was facing issues in using it. Problem was that data transmitted was not correct for example if the buffer has 0x01 transmitted was 0x1F ! And while debugging the code I found that:

 

At Line 235, 

 

uint8_t *wdata8;

wdata8 = &buffer;// I Added '&' before buffer 

Without & the wdata8 will not hold the data pointed by buffer, so by adding & I am assigning the address of buffer which will point to the data I need to transmit.

Outcomes