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

Refactor AVR DA support #54

Open
mraardvark opened this issue May 1, 2020 · 3 comments
Open

Refactor AVR DA support #54

mraardvark opened this issue May 1, 2020 · 3 comments

Comments

@mraardvark
Copy link
Owner

right now its a mess, and should use subclasses for the 16 and 24 bit UPDI modes as well as the two NVM controllers

@SpenceKonde
Copy link
Contributor

By the way, if you weren't aware, you have to always use 24-bit commands on these parts. Once you do a 24-bit ST ptr, if you do then do a 16-bit STS/LDS, the high byte of the pointer gets used! We ran into that on jtag2updi, It would write a page of flash, then try to write a NOOP to NVMCTRL.CTRLA with a 16-bit STS..... instead writing to a byte of flash at 0x1000 in the flash address space.... and then it would check NVMCTRL.STATUS and see the 0xFF of empty flash.... I was going crazy, heh...

@mraardvark
Copy link
Owner Author

yes, this is by design, and is also the case with xmega PDI...

@SpenceKonde
Copy link
Contributor

It would have been really nice if the datasheet said as much... I spent weeks trying to figure that out....

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