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

Potential causes for slowdown after porting from sdk5.2.0/s110 to sdk12.1.0/s130v2.0.1

Hi,

anyone would have any idea (to look at, as to) why the same app running on the same chip/PCB (nrf51822QFAAH rev3) could possibly have slowed down so massively after a port from SDKv5 to SDKv12? Most noticeable are the interaction between CPU and SPI:display and SPI:flash(storage), both being on the same SPI0. Note that when switching back to v5, the speed is fine.

The code basically uses softdevice (for bluetooth, but slowdown is same when BLE is active or not), GPIOTE IRQ (custom), ADC (custom), spi (custom) and 6 timers (app_timer, mininum 1minute resolution), scheduler (app_scheduler).

my sdk_config.h:

#define BLE_ADVERTISING_ENABLED 1
#define BLE_BAS_ENABLED 1
#define BLE_DIS_ENABLED 1
#define BLE_NUS_ENABLED 1
#define APP_SCHEDULER_ENABLED 1
#define APP_TIMER_ENABLED 1
#define CRC16_ENABLED 1
#define FSTORAGE_ENABLED 1 // dont use, there is only a fancy dependency in ble_advertising.c
#define BLE_ADVERTISING_ENABLED 1

The sd is configured with:

#define NRF_CLOCK_LFCLKSRC      { .source        = NRF_CLOCK_LF_SRC_XTAL,            \
                                  .rc_ctiv       = 0,                                \
                                  .rc_temp_ctiv  = 0,                                \
                                  .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM }

unfortunately not much more to tell ... but would really like to hear any hints ...

*EDIT: may it have something with any IRQ/Prioritisations changes from S110>S130

thx

Parents
  • @Petter: the analysis is mainly visual: whenever the user press a button, the app will show the time and some icon. the time is basically a string "##:##" and the icon is 48x48 (fetched in 1KB blocks). The icon is an RGB565 image stored on external flash (SPI0) and displayed on a ST7735 (not the fastest) (also SPI0). The difference in speed is really visual: when compiled w v5.2.0/S110, things appear at a certain speed; when compiled w v12/S130, speed is like div4: one will see individual characters being printed, same on the icon which appears really slowly. (note that I reviewed my SPI master implementation, and tried at various frequencies (M1 up to M4))

Reply
  • @Petter: the analysis is mainly visual: whenever the user press a button, the app will show the time and some icon. the time is basically a string "##:##" and the icon is 48x48 (fetched in 1KB blocks). The icon is an RGB565 image stored on external flash (SPI0) and displayed on a ST7735 (not the fastest) (also SPI0). The difference in speed is really visual: when compiled w v5.2.0/S110, things appear at a certain speed; when compiled w v12/S130, speed is like div4: one will see individual characters being printed, same on the icon which appears really slowly. (note that I reviewed my SPI master implementation, and tried at various frequencies (M1 up to M4))

Children
No Data
Related