10 years, 1 month ago.

SPISlave Class dosn't work on LPC1114

I tried " SPISlave device(dp2, dp1, dp6, dp25); mosi, miso, sclk, ssel" as the sample code in the Handbook. It didn't work. I think IOCON_SCK_LOC is not set properly. /media/uploads/aie/spi0cr.png /media/uploads/aie/badconfig.png

Question relating to:

The LPC1114FN28 is an ARM Cortex-M0 based, low-cost 32-bit MCU, designed for 8/16-bit microcontroller applications, offering performance, low power, simple instruction set and memory addressing together with reduced code size …

Hello,

this is the implementaiton https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/spi_api.c . Looks like you are working offline, so you can see the implementation for spi slave.

posted by Martin Kojtal 10 Oct 2014

Quote:

Is this now in the main library? I still had to set the SCK_LOC register to get it working.

Doug

The updated mbed library hasn't been released yet.

You can use latest mbed-src libray (rev 425 or lator) instead. http://developer.mbed.org/users/mbed_official/code/mbed-src/rev/73631a54077f

posted by Toyomasa Watarai 04 Jan 2015

1 Answer

9 years, 11 months ago.

Hi Uno-san,

Thank you very much for your report. Yes, you are right. There are extra IOCON settings for specific functions of LPC11xx.

I fixed the problem in the LPC1114 SDK and it merged into master repo.

https://github.com/mbedmicro/mbed/pull/756

You will get the fix by next SDK release.

Accepted Answer

Is this now in the main library? I still had to set the SCK_LOC register to get it working.

Doug

posted by Doug Morgan 04 Jan 2015

Assigned to Toyomasa Watarai 9 years, 11 months ago.

This means that the question has been accepted and is being worked on.