Go Down

Topic: Parsing the .atdf file to get info you can't find in the .h files... (Read 431 times) previous topic - next topic

westfw

There's a lot of info that isn't in the .h files that programs include.  :-(
Stuff like mapping port pins ("PA02") to the functions it might provide, or even chip pin numbers to what port or function they are.

This IS available in ".ATDF" files that Atmel provides.  And most probably in the ".SVD" files that are supposedly standard for ARM Cortex-M chips in general.  All you have to do is parse them and do some fiddling.

Teaser:

Code: [Select]
showChipPin("44")
Chip Pin 44 on ATSAMD51P20A is PB15
ADC0
CCL
EIC
GCLK
PCC
PORT
SERCOM4
TC5
TCC0
TCC4
None



westfw

This is coming along nicely.  I'm even willing to have other people give it a try...

https://github.com/WestfW/Atmel_ATDF_parser

Code: [Select]

 ./sam_pinmux2array.py ATSAMD21E15L.atdf 12 13 20 sercom0

Chip Pin 12 on ATSAMD21E15L is PA09
  ADC: AIN17 pmux:B_ADC
  EIC: EXTINT9 pmux:A
  PORT: P9 pmux:default
  SERCOM0: PAD1 pmux:C
  SERCOM2: PAD1 pmux:D
  TCC0: WO1 pmux:E
  TCC1: WO3 pmux:F
Chip Pin 13 on ATSAMD21E15L is PA10
  ADC: AIN18 pmux:B_ADC
  EIC: EXTINT10 pmux:A
  GCLK: IO4 pmux:H
  PORT: P10 pmux:default
  SERCOM0: PAD2 pmux:C
  SERCOM2: PAD2 pmux:D
  TCC0: WO2 pmux:F
  TCC1: WO0 pmux:E
Chip Pin 20 on ATSAMD21E15L is PA19
  AC: CMP1 pmux:H
  EIC: EXTINT3 pmux:A
  PORT: P19 pmux:default
  SERCOM1: PAD3 pmux:C
  SERCOM3: PAD3 pmux:D
  TC3: WO1 pmux:E
  TCC0: WO3 pmux:F
PA04 SERCOM0 PAD0 pmuxD
PA05 SERCOM0 PAD1 pmuxD
PA06 SERCOM0 PAD2 pmuxD
PA07 SERCOM0 PAD3 pmuxD
PA08 SERCOM0 PAD0 pmuxC
PA09 SERCOM0 PAD1 pmuxC
PA10 SERCOM0 PAD2 pmuxC
PA11 SERCOM0 PAD3 pmuxC

Go Up