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

regarding spi communication

hello,

i am using nrf52840 in our customised board and trying to interface it with  GDEW0213Z16 2.13 inch display which uses spi communication i have added the necessary api"s and changed the pin configuration according to my board but while running my code  i am nrfbreak point error in this section

nrfx_err_t nrfx_spim_xfer(nrfx_spim_t const * const p_instance,
nrfx_spim_xfer_desc_t const * p_xfer_desc,
uint32_t flags)
{
spim_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx];
NRFX_ASSERT(p_cb->state != NRFX_DRV_STATE_UNINITIALIZED);
NRFX_ASSERT(p_xfer_desc->p_tx_buffer != NULL || p_xfer_desc->tx_length == 0);
NRFX_ASSERT(p_xfer_desc->p_rx_buffer != NULL || p_xfer_desc->rx_length == 0);
NRFX_ASSERT(SPIM_LENGTH_VALIDATE(p_instance->drv_inst_idx,
p_xfer_desc->rx_length,
p_xfer_desc->tx_length));

can anyone tell me how can i resolve this issue

thanks and regards

manikandan v

Parents
  • Hello,

    As an addition to what @awneil already has suggested;
    Do you have logging enabled from your device?
    If so, please add DEBUG to your preprocessor defines, so that you may see a more detailed error message upon hitting the breakpoint error.
    It should look like in the included image:


    The asserts you've added in your ticket all just check that the SPI peripheral is initialized, and that the data the function is being called with is valid. So, if you're triggering these asserts you either have not initialized the SPI peripheral successfully, or you are trying to call the function with invalid parameters.

    In any case we should know more about what is happening either when you define DEBUG and see your logger output, or use the debugger to step through your code like suggested by Awneil.

    Best regards,
    Karl

Reply
  • Hello,

    As an addition to what @awneil already has suggested;
    Do you have logging enabled from your device?
    If so, please add DEBUG to your preprocessor defines, so that you may see a more detailed error message upon hitting the breakpoint error.
    It should look like in the included image:


    The asserts you've added in your ticket all just check that the SPI peripheral is initialized, and that the data the function is being called with is valid. So, if you're triggering these asserts you either have not initialized the SPI peripheral successfully, or you are trying to call the function with invalid parameters.

    In any case we should know more about what is happening either when you define DEBUG and see your logger output, or use the debugger to step through your code like suggested by Awneil.

    Best regards,
    Karl

Children
No Data
Related