4 years, 10 months ago.

Some trouble with LPC824 Switch Science

hi, I have some trouble with LPC824 :

On I2C : The same program works with LPC1768 and LPC11U24 !

I2C.write(adr, &T, x, false) : works fine, I2C signals on scope are okay, slave is okay

but not if I try : I2C.start(); I2C.write(adr); I2C.write(data); I2C.Stop(); no compilation error and no signal on scope, since start signal to more.

Using rand() : no compilation error on the program line, but the microcontroller stops running on this instruction ! It works with others microcontrollers.

here are informations on my LPC824 board (into the DETAILS.TXT file) :

  1. DAPLink Firmware - see https://mbed.com/daplink Unique ID: 101800000dbf3f3200000000000000000000000097969902 HIC ID: 97969902 Auto Reset: 0 Automation allowed: 0 Daplink Mode: Interface Interface Version: 0241 Git SHA: 4864068bf12868869d83ae48ccbbffba1602d8c3 Local Mods: 1 USB Interfaces: MSD, CDC, HID Interface CRC: 0x538f758a

Does some one halp me with these troubles ?

Thank you CTophe

1 Answer

4 years, 10 months ago.

The mbed I2C byte send/receive methods dont work correctly on the LPC800 family. This is due to the implementation of the I2C hardware engine on the LPC800 which is different from the LPC1768/LPC11u24. I started a discussion on the github thread some time ago, but it has not been solved and might be impossible to fix due to the hardware properties. Use the blockwrite and blockread methods instead. These work across all mbed platforms.

Accepted Answer