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.
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.
I managed to flash my nrf52832. But, oled display does not behave like I desire. Example, when I want to draw a circle, it does not display a circle. The oled display prints meaningless things.
NOTE: I defined 128x32 properly in h file, but I cannot have any action. It prints meaningless stuffs when 128x64 is defined.
Like I said, I have only ported the example and changed the TWI driver. I do not have a display to test with. You will have to check the datasheet of the device and check transmission with a logic analyzer, etc. to see if the commands sent to the display is correct.