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

How to use pyupdi #76

Open
paulskirk53 opened this issue Feb 13, 2021 · 5 comments
Open

How to use pyupdi #76

paulskirk53 opened this issue Feb 13, 2021 · 5 comments

Comments

@paulskirk53
Copy link

paulskirk53 commented Feb 13, 2021

Hello, I read the readme file and I am looking to program atmega 4809 which uses updi as a programming method. Also using Platformio IDE. When I look at the pyupdi circuit diagram, it looks like an FTDI board on the left, but my question is, could an arduino be used instead of the FTDI? If it's possible to use an Arduino Uno, what software would be needed on the Uno?

thanks for help with this.
Paul

@mraardvark
Copy link
Owner

Hi Paul - I guess your board has some sort of USB-serial converter, which is technically all you need. However you will need to prevent the mega328(?) device from interfering with UPDI, so I would guess it has to be erased/disconnected somehow. I am not an expert with the Arduino boards unfortunately...

@paulskirk53
Copy link
Author

thanks for reply. It's probably just as easy to use a USB to serial converter, I'll try that. Do you by any chance know if it's possible to debug the 4809 chip using UPDI? I'm new to MCUs outside of Arduino and using Platformio for coding. Thanks very much,
Paul

@mraardvark
Copy link
Owner

You can debug using UPDI, but not with pyupdi - the debug system is not exposed.
I would recommend getting a Snap as standalone debugger or Curiosity Nano kit with on-board debugger (can easily be cut off and used as a standalone debugger, but for UPDI parts only). The platformio support for debug is (as I have tried) still clumsy compared to Studio or MPLABX.

@paulskirk53
Copy link
Author

thanks very much for the advice. I guess the snap debugger will work with atmel studio 7 as its the same manufacturer, and I'll enquire with the platformio guys if it will work with PIO.
much appreciate your help - it's a minefield for newcomers!
Paul

@mraardvark
Copy link
Owner

Snap works with Studio 7 in "AVR mode" (in which it looks and behaves like an atmel-ice) but still has to be upgraded in MPLABX.
Moving to "bare metal" has its challenges, yes... but can be fun and rewarding :)
If you can get your hands on a Curiosity Nano kit it can be a great starting point (although I may be biased here :/ )
Both bare metal and MCC/Start (library-based) examples are now published on github for the new AVRs: https://github.com/microchip-pic-avr-examples so filter by device and look for something interesting there to play with.
I think you will need "debugging", and you will need a decent "peripheral view" which both Studio 7 and MPLAB have (not sure about platformio). Try it in the simulator first even, without spending a penny...

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

2 participants