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

add new target: cryptoauth trust platform #3494

Closed
hugolgst opened this issue Feb 27, 2023 · 7 comments
Closed

add new target: cryptoauth trust platform #3494

hugolgst opened this issue Feb 27, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@hugolgst
Copy link

I would love to see the CryptoAuth Trust Platform being added.
It uses ATSAMD21E18A which is already implemented.
https://www.microchip.com/en-us/development-tool/DM320118

@deadprogram deadprogram added the enhancement New feature or request label Mar 1, 2023
@hugolgst
Copy link
Author

hugolgst commented Mar 6, 2023

I can't get this code to blink the LED. Any idea why?
image
Here are some information about the chip: https://ww1.microchip.com/downloads/aemDocuments/documents/SCBU/ProductDocuments/BoardDesignFiles/DM320118-schematics.PDF

It seems to flash ok but the LED is not blinking

image

@conejoninja
Copy link
Member

I think it should be something like this instead:

var led = machine.LED
led.Configure(machine.PinConfig{Mode: machine.PinOutput})

@hugolgst
Copy link
Author

hugolgst commented Mar 6, 2023

Yes but since it is a custom board I did not set PinOutput in the board's file yet.

@conejoninja
Copy link
Member

Ummm, but no need to re-define the PinOutput, since it's already in the machine_atsamd21.go file https://github.com/tinygo-org/tinygo/blob/release/src/machine/machine_atsamd21.go#L29 plus it should be 11 not 0

Also, let's try with

var led = machine.LED

instead of

var led machine.Pin = 2

@hugolgst
Copy link
Author

hugolgst commented Mar 6, 2023

right, I was confused with something else. Now I am indeed using LED and PinOutput, it was just this. I can't thank you enough for your help. Better read the documentation well next time.

I will try to clean out everything and make a pull request to add my board.

Have a nice day

@conejoninja
Copy link
Member

No problem!
Adding a new board should be easy as long as the chip is already supported like this case.

I proceed to close this issue, please open a PR when your new board is ready!

Thanks for your work

@hugolgst
Copy link
Author

hugolgst commented Mar 7, 2023

#3527

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

No branches or pull requests

3 participants