I2C connected to DA14531MOD-devkit-vC using CodeLess

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
Gotfredsen
Offline
Last seen:9 months 4 days ago
加入:2020-07-17 14:02
I2C connected to DA14531MOD-devkit-vC using CodeLess

Hi,

Using the done-in-a-day kit I have managed to turn a LED on and off connected toSCLandSDAon the small board's (DA14531MOD-devkit-vC) mikroBUS, using the "DA14531 standalone (SET-TWO)" firmware. I also managed to test digital input setting the pins high and low, but when I configure for I2C using "AT+IOCFG=11,8" and "AT+IOCFG=8,7", and then run a "AT+I2CSCAN" with a I2C device connected to SDA and SCL, the system hangs for a while, after which it reboots (I believe), I have a heartbeat LED "AT+IOCFG=9,27" running, which suddenly turns off - assuming a reset/reboot.

我曾经尝试过与mainboard disconnected, powering the small board using the mikroBUS 3V and GND. Using the iOS app I then connect via BLE and run the same AT commands above, incl testing the LED's and digital input, all perfectly running, but the I2C is still just crashing.

PM_Dialog
Offline
Last seen:2小时29分钟前
Staff
加入:2018-02-08 11:03
Hi Gotfredsen,

Hi Gotfredsen,

Thanks for your forum post and for taking part in the “done-in-a-day”.

So, you are using the codeless_531_standalone_set_two.hex from the Flash Programmer tool and after connecting the module to a peer device (iOS app), the connection drops. Please correct me if I am mistaken.

Does the connection drop only when having I2C configuration? If you don’t have any I2C activity, can you replicate this behavior? Is the connection stable or it drops again?

你尝试使用另外两个pre-com有空吗piled images (codeless_531_datadump and codeless_531_standalone)?

Thanks, PM_Dialog

Gotfredsen
Offline
Last seen:9 months 4 days ago
加入:2020-07-17 14:02
So it has nothing to do with

So it has nothing to do with a peer device. That was just to see if it made a difference from using PyTTY or similar Serial Terminal - and it didn't.

As you can see in the attached image, I have activate the LED on the small board using the Heartbeat function "AT+IOCFG=9,27"
I then configure the SDA and SCL and run a I2CSCAN as per the attached screenshot from my serial terminal program. After a minute or so (after the red arrow), it returns a dot (.) and on the next line "+READY" and the LED goes out.

Which is why I assume the boards resets after a while. I am trying without anything attached, but I have tried with many different I2C sensors, without luck.

And...

  • I can only use Codeless SET_TWO, since I2C is not supported on the two other Codeless version as per the documentation. (Also I have tried, but you get an error when you try to configure the SDA and/or SLA.)
  • I have also tried running the I2CEEPROM example, using both this done-in-a-day-kit and the DA14531MOD USB Kit, and there I can't get I2C to work either. I do have a I2C EPPROM with same slave address, same size (0x20000) and same page size. It doesn't crash, but just give me I2C error 0x01...
  • I have just tried with DA14531MOD USB Kit and also SET_TWO. Here I am using the SDA and SCL as marked on the board and the Heartbeat:
    Heartbeat:AT+IOCFG=9,27
    SDA:AT+IOCFG=8,8
    SCL:AT+IOCFG=2,7
    Scan:AT+I2CSCAN
    ...but since I can't get to the Serial Console using PuTTY or similar, I use the iOS APP ... and I get same result, except I don't have to wait, it switches the LED off immidiately and drops the connection to my iPhone, so here I also expect a crash...
PM_Dialog
Offline
Last seen:2小时29分钟前
Staff
加入:2018-02-08 11:03
Hi Gotfredsen,

Hi Gotfredsen,

Thanks for your detail response. Please download the “SET_TWO” CodeLess firmware, connect the module with your iPhone and leave as it is ( without sending any of the available AT comments and without I2C activity). Can you replicate the connection drop?

Thanks, PM_Dialog

Gotfredsen
Offline
Last seen:9 months 4 days ago
加入:2020-07-17 14:02
I am using SET-TWO, as

Iamusing SET-TWO, as mentioned before. There are no reset/reboot/connection drop, unless I issue an AT+I2CSCAN command.

PM_Dialog
Offline
Last seen:2小时29分钟前
Staff
加入:2018-02-08 11:03
Hi Gotfredsen,

Hi Gotfredsen,

Could you please run it with the debugger attached and check if It stacks anywhere? You should enable the development debug for the debugging (#define CFG_DEVELOPMENT_DEBUG).

Thanks, PM_Dialog

Gotfredsen
Offline
Last seen:9 months 4 days ago
加入:2020-07-17 14:02
Hi,

Hi,

Sorry for my ignorance, but does that mean I have to re-compile the SET_TWO, with the #define set, or is it at "thing" on the development boards?
If I have to recompile, I have an issue since the resulting code is larger than 32k, which is the limitation on my Kiel/uVision. I believe I have tried a while ago, and that this error came up, possibly on one of the other CODELESS version, but I can only imaging the SET_TWO is larger.

Thanks again for you assistance,

Bjarke

PM_Dialog
Offline
Last seen:2小时29分钟前
Staff
加入:2018-02-08 11:03
Hi Gotfredsen,

Hi Gotfredsen,

Yes – in order to run it in debug mode you should use the Keil IDE and attach the debugger. Would it be possible o do it?

Thanks, PM_Dialog