Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial port on different hardware/software revisions #268

Open
kritzikratzi opened this issue Feb 21, 2023 · 1 comment
Open

Serial port on different hardware/software revisions #268

kritzikratzi opened this issue Feb 21, 2023 · 1 comment

Comments

@kritzikratzi
Copy link

kritzikratzi commented Feb 21, 2023

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 1cda4b3 ✔¹ ✔¹
Mar 31 2021 10b2574 ❌² ✔ ² ❌² ✔²
Nov 29 2022 6c14f83 (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 34b0ab7 => ✔ serial works
Feb 3 2021 afe4f46 => ❌ serial broken


pps. i've drilled a little deeper. the code changes in the commit afe4f46 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:

image

(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);
}
@kritzikratzi
Copy link
Author

kritzikratzi commented Feb 21, 2023

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant