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

custom board: cannot initiate I2C connection – atsamd21e18a #3535

Closed
hugolgst opened this issue Mar 9, 2023 · 3 comments
Closed

custom board: cannot initiate I2C connection – atsamd21e18a #3535

hugolgst opened this issue Mar 9, 2023 · 3 comments
Labels
question Question about usage of TinyGo

Comments

@hugolgst
Copy link

hugolgst commented Mar 9, 2023

Hello,

I am trying to initiate an I2C connection with my custom board following the documentation. I can blink the LED and monitor the serial output to see my logs.

However, when I start adding the I2C code, there are errors:

  1. With SERCOM1 or SERCOM3:
    I can flash the device and see my LED blinking; however, I get an error in my logs: "invalid clock pin," which is, I believe, coming from this part of the code.

  2. With SERCOM0 or SERCOM2:
    When flashing the device, it apparently succeeds, but nothing is happening on my board - no LED flashing and no serial output to monitor. It is not even appearing. Using GDB, I can get the information that there has been a HardFault.

Here are some pieces of information about the board I am trying to add. It uses ATSAMD21E18A, which is already implemented. This is the PR that adds my board - CryptoAuth Trust Platform.

I have been trying for two weeks now to make my board work with TinyGo without success and am a bit desperate right now. Thanks in advance for your help.

Some additional information:

–hugo

@deadprogram
Copy link
Member

I made a few comments about errors in your board file. Hopefully that will help get you unstuck. 😸

@aykevl
Copy link
Member

aykevl commented May 3, 2023

@hugolgst have you tried looking into which SERCOMs are used for I2C (and possibly other peripherals) in other board support packages? You need to use the right SERCOM and can't re-use them for both I2C and UART for example (so if you use SERCOM0 for UART, you can't use it again for I2C).

@deadprogram deadprogram changed the title cannot initiate I2C connection – atsamd21e18a custom board: cannot initiate I2C connection – atsamd21e18a May 12, 2024
@deadprogram
Copy link
Member

CLosing due to age, please reopen if needed. Thank you everyone!

@deadprogram deadprogram added the question Question about usage of TinyGo label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about usage of TinyGo
Projects
None yet
Development

No branches or pull requests

3 participants