This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Strange SPI problem

Hi 

I am new to ARM and Nordic programming.

I want to send one HEX byte via SPI.

It works with some HEX numbers and with some numbers it wont.

0x13 / 0x15 work

0x14 / 0x0C dont work

I check SCLK and MOSI signals with the scope.

i want to use the SPI to initialize my LCD

my code

void InitSPI(void)
{

   nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG(SPI0_INSTANCE_INDEX); 

   nrf_drv_spi_init(&spi, &spi_config, NULL);

}



void SPI_send_byte(uint8_t data)
{
   nrf_drv_spi_transfer(&spi, &data, 1, NULL, 0); 
}



*****

every 500ms

SPI_send_byte(0x14);  

Thanks for your Help

M. Aerni

Parents Reply Children
No Data
Related