-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
HAL: increase internal feature granularity, PR guideline for revs. A/B #11
Comments
This is a bit bizzare. Last time I checked couple years ago there was no Rev A on sale (at least Vs and Ss). Moreover, there was no right data sheets for Rev A and use of some peripherals is different, meaning to support both we effectively need two branches of HALs. |
Checked a few, both A and B have availability dates from May 2023. |
Yes. In practise this would be checking In any case, because I'm only working with rev. B at the moment, I only plan to commit code for rev. B; hence the PR proposal. |
TBH my intention was only to support Rev B - the only time I saw Rev A chip was pre-sales dev board from Atnel 7 years ago. As far as I remember representative told us to not plan Rev A for production. It's hard to belive the fab would like produce both these days. I don't mind making distinction, but B has to be the default. |
Agreed. We can target B for now and yield an appropriate error in Current rev. A PAC READMEs should probably be amended to indicate their outdated nature. |
After comparing PACs it was concluded that rev. B of all SVDs (from which crates with the
b
-suffix are generated) include a more exhaustive memory-mapped API in comparison to rev. A. Most notable are perhaps the usage ofUSART::us_{mr,csr,cr}_{usart,spi}_mode
in rev. B andUSART::us_{mr,csr,cr}
in rev. A. Of note in A is that some peripherals function register fields have different meaning depending on a master switch; i.e., when using USART in SPI mode auxilliary fields have different effects.The idea of always using B SVDs/PACs sprung up but was altimately dropped after a brief conversation with Microchip: A/B have hardware changes for the Ethernet and CAN peripherals.
It is logical to support both revisions due to chip shortages.
So in summary, and with combination with §2 (below; see also §1 on page 14), we should add internal feature flags for permutations of the following predicates:
Further, in order to speed up development, I propose that PRs must not implement an API for both rev. A and B.
The text was updated successfully, but these errors were encountered: