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

SPI transmission problem with SoftDevice S130

Hello,

I try to build a working firmware for reading some parameters from external sensors and transmit them thru BLE (I am using S130 and SDK 12.3.0). I have already developed the solution and it is working just fine, Now I want to display some info on the SPI display connected to my nRF51822 device. I can communicate with the display, so it's not a problem, problems are starting after starting BLE stack with active SPI transmission.

I have placed some SPI transmission code into the main loop of the firmware, something like that:

  for (;;)
  {
    power_manage();
    if (flag)
    {
      sprintf(str, "%.1f", (float)temp / 100);
      ST7735_DispStringHCenterAt(str, Font_16x26, ST7735_WIDTH / 2, 30);
      flag = false;
    }
  }

Communication with ST7735 is nothing more than some series of SPI transmissions. If I choose a smaller font (about 400 words to transmit per one sign) everything is OK, BLE is working, temperature is updated every 5 seconds. But if I want to use bigger font (about 1500 words per sign) it is displayed only once. BLE is not working anymore, text is not updated also. I am pretty sure it has nothing to do with firmware errors. I can display texts with selected font many times successfully before BLE stack is started.

So it should have something to do with transmission duration. What could it be? Please advice, I can't find any signs of errors and I am very disappointed.

With best regards, Alex

Parents Reply
  • Hi,

    Have you made sure to disable optimization when you test? That way it is easier to step through code. Also, you should define DEBUG for your project, as that will make the error checks and logging better.

    It sounds weird that the SoftDevice should enter a bad state just because you use more data over SPI, and if it is, the stack pointer should point to somewhere within the SoftDevice flash region. Does it?

Children
Related