I am trying to use my oled display with my nRF52832. I found a library that had been written before: https://github.com/monpetit/nrf52-spi-i2c-master-ssd1306
The problem is that library works on SDK 10 and I cannot manage to build the code with SDK 15.2.0. Differences between SDK versions are causing problems for me.
For example, While APP_TIMER_INIT is useful for a SDK, other SDK works with APP_TIMER_DEF. Differences like these disable me having action on my OLED display. How can I handle differences between SDKs ? Is there any way to find current names of functions, macros etc. in old SDKs. Maybe, how can I have a ssd1306 library for current SDK version.
I hope I could explain my problem properly.
Are you using SPI or TWI to interface with the display? It is not simple to interface this display with nRF52832, as it requires writing more than 255 bytes per transfer. The legacy drivers for TWI and SPI in later SDKs are limited to 255 bytes, to align with EasyDMA MAXCNT register in nRF52832 (8 bits length). You can make it work by using the non-EasyDMA SPI/TWI peripherals, but you will have to rewrite the code to use NRFX drivers that do not have the 8-bit length limitation.
Thank you for quick reply,
I am using TWI(i2c).
Let me ckeck that did I understand well what you explained.
I should not use SDK v15.2.0 to do this, I have to modify the code on the github to work properly with NRFX drivers ?
You can still use nRF5 SDK, but you will have to modify which drivers are used (nrfx drivers are included in SDK 15.x.0).
I have ported the example to SDK 15.2.0, and swapped drivers for nrfx_twi, but I have not tested it since I do not have the correct display available. Check out if you are able to use this with your display. Note that the SPI portion of the code is non-functional.
Thank you Mr.Holmefjord.
I will try your code as soon as possible and report the result.
Which way should I follow to build the code ? I saw different main.c files and different folders. Which one do I need ?