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

ask about this BUG the SPIM: An additional byte is clocked out when RXD.MAXCNT = 1

Dear nordic employee

when I use the spim to send 1 byte address to read it's value(4 bytes)

nrf_drv_spi_transfer(&spi,headerBuffer,(uint8_t)headerLength,readBuffer,(uint8_t)readlength);    headerLength=1;      readlength=4;

I get the problem like the title says

I try to solve it

so I DO like this :spi_pan58_workaround_sdk12.zip(which Referred here

but when I try to read 4byte data(with 1 byte address write),the result is 00 00 00 00(it should be 12 02 33 44 )

where is wrong ?

thank you!

Parents
  • Hi,

    • What SDK version are you using ?
    • What was the result of the read operation before you added the workaround ? Did you get 00 00 00 00 before you added the workaround also? or did you get something else?
  • thank you for your code

    but I have two more questions

    1、I haven't see any difference between your code and the spi_pan58_workaround_sdk12.zip(about the spi),so what do you mean spi_pan58_workaround_sdk12.zip is just for sdk12?

    what is the difference between the spi_pan58_workaround_sdk12.zip and you code above?

    2、today I just try init like this : nrf_drv_spi_init(&spi, &spi_config, spi_event_handler, NULL);

    haven't added the PPI and gpiote code yet

    only add the spi_event_handler

    the result turn to be :00 00 00 00(right is 12 02 33 44),even the spi_event_handler is NULL Like

    this:void spi_event_handler(nrf_drv_spi_evt_t const * p_event,void * p_context) { //do nothing }

    when I remove the spi_event_handler,like this :nrf_drv_spi_init(&spi, &spi_config, NULL, NULL),the result is turn to be FF 12 02 33

    my question is:why the spi_event_handler can influence the result

    thank you!

Reply
  • thank you for your code

    but I have two more questions

    1、I haven't see any difference between your code and the spi_pan58_workaround_sdk12.zip(about the spi),so what do you mean spi_pan58_workaround_sdk12.zip is just for sdk12?

    what is the difference between the spi_pan58_workaround_sdk12.zip and you code above?

    2、today I just try init like this : nrf_drv_spi_init(&spi, &spi_config, spi_event_handler, NULL);

    haven't added the PPI and gpiote code yet

    only add the spi_event_handler

    the result turn to be :00 00 00 00(right is 12 02 33 44),even the spi_event_handler is NULL Like

    this:void spi_event_handler(nrf_drv_spi_evt_t const * p_event,void * p_context) { //do nothing }

    when I remove the spi_event_handler,like this :nrf_drv_spi_init(&spi, &spi_config, NULL, NULL),the result is turn to be FF 12 02 33

    my question is:why the spi_event_handler can influence the result

    thank you!

Children
No Data
Related