CubeCell-Arduino
CubeCell-Arduino copied to clipboard
Serial port on different hardware/software revisions
Hello!
I'm currently trying to upgrade our small embedded product from HTCC-AM01 to HTCC-AM01-V02 and have some troubles.
I'm trying to be systematic about it, ~my actual problem is with the ADC~ (update: found a fix with some external help), but i need to take it one step at a time. So for now: It seems Serial port functionality broke somewhere along the way.
Soft.Rev / Hard.Rev | AM01 | AB01 | AM01-V2 | AB01-V2 |
---|---|---|---|---|
Nov 27 2020 1cda4b33450d3e599d20ee142ebe016da968632e | ✔ | ✔ | ✔¹ | ✔¹ |
Mar 31 2021 10b257458a31d1ed3427724e1f5bb3902e48f631 | ❌² | ✔ ² | ❌² | ✔² |
Nov 29 2022 6c14f832107780af98b412481172ba1b1274619e (HEAD) | ❌ | ✔ | ❌ | ✔ |
❌= No serial output ✔= Serial output works
¹) Selected HTCC-AM01 in Arduino as target board, because there is no HTCC-AM01-V2 yet. ²) Selected HTCC-AB01 because HTCC-AM01 is not useable (a bug with the properties in arduino)
Test code:
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("hi");
delay(3000);
}
ps. i did spend a bit of time to find out exactly where the serial port breaks.
to test i used arduino 2.0.3, a custom board with htcc-am01 and "htcc-ab01" selected in arduino (htcc-am01 won't compile).
Here are two successive commits. HardwareSerial works in the first commit, but is broken in the second.
Feb 3 2021 34b0ab7ba2874c287d06053a416d040b437d37e2 => ✔ serial works Feb 3 2021 afe4f46d0ce47c6b61998bef8fc964874d175914 => ❌ serial broken
pps. i've drilled a little deeper. the code changes in the commit afe4f46d0ce47c6b61998bef8fc964874d175914 make no difference whatsover. the problem appears to come from CubeCellLib.a. when i dissassemble and diff I can see that only three functions were changed: wakeFromUart
, onAutoLpm
and UART_1_Start
. the last change looks particularly suspicious to me:
(2 = OUTPUT_PULLUP, 6 = OUTPUT)
ppps. final update: my suspicion still seems correct, in some sense. here is my updated example:
void setup() {
Serial.begin(115200);
pinMode(25,OUTPUT); // overwrite the change in CubeCellLib.a => Serial port works again on AM01 and AM01-V2
}
void loop() {
Serial.println("hi");
delay(3000);
}
leaving another comment simply to trigger a notification. i've updated my report, and i'm a little confused whether this change was simply untested, or whether something is wrong with our pcb (or our programmer circuit!)
internally, do you test also on the modules, or only on dev boards?
i'm leaving this bug open for now, even if i have a workaround for myself, and will go on to hunt the ADC issue :)