Recently I am working on a product based upon LPC1114 and EPD, check it out.
Basically I used mbed API, SSD driver libraries and I2C NVMEM libraries. I cloned SSD1306 libraries from Jonathon.
Because I want to save time on debugging, I export the code into MDK. I am very surprised the code will never goes to main() if I initialize SSD1306 object.
The disassembly shows it goes through
- Reset_Handler:
- main:
- main_scatterload:
- main_after_scatterload:
- main_after_initio:
BL.W _cpp_initialize_aeabi_
Then it never jumps to main(), but stops on certain BKPT 0xAB.
I used eeprom libraries to replace SSD1306 liabries to test cpp initialization routines. It works. However, I have no idea why SSD1306 libraries will have problem.
SPI constructor error?
I prepared my code of SSD1306 on LPC1114, only for exporting and debugging on MDK.
After narrow down the issue, I found SPI constructor has issue. No matter I create an SPI object, or transfer PinName to SSD1306 constructor to create SPI object inside. The problem can be reproduced.
Does SPI PinName has limitations? Such only P5/6/7 or 11/12/13 is allowed. Therefore it limits hardware reuse for alternative functions on other pins?
Please help me if anyone knows the background.
Recently I am working on a product based upon LPC1114 and EPD, check it out.
Basically I used mbed API, SSD driver libraries and I2C NVMEM libraries. I cloned SSD1306 libraries from Jonathon.
Because I want to save time on debugging, I export the code into MDK. I am very surprised the code will never goes to main() if I initialize SSD1306 object.
The disassembly shows it goes through
Then it never jumps to main(), but stops on certain BKPT 0xAB.
I used eeprom libraries to replace SSD1306 liabries to test cpp initialization routines. It works. However, I have no idea why SSD1306 libraries will have problem.
SPI constructor error?
I prepared my code of SSD1306 on LPC1114, only for exporting and debugging on MDK.
After narrow down the issue, I found SPI constructor has issue. No matter I create an SPI object, or transfer PinName to SSD1306 constructor to create SPI object inside. The problem can be reproduced.
Does SPI PinName has limitations? Such only P5/6/7 or 11/12/13 is allowed. Therefore it limits hardware reuse for alternative functions on other pins?
Please help me if anyone knows the background.