summaryrefslogtreecommitdiff
path: root/docs/samd
AgeCommit message (Collapse)Author
2025-05-28samd/boards: Add two SparkFun SAMD21 boards.robert-hh
Add support for the boards: - SparkFun SAMD21 Dev Breakout - SparkFun RedBoard Turbo Both boards are SAMD21 based and actively sold by SparkFun. Signed-off-by: robert-hh <robert@hammelrath.com>
2025-05-07docs,ports: Fix SparkFun capitalization.Malcolm McKellips
This is a follow-up to 1e92bdd206f6f87ba65ea05c5b2623fca0b926cd correcting more of the instances where "Sparkfun" should be "SparkFun". Signed-off-by: Damien George <damien@micropython.org>
2025-03-03docs/samd: Update the SAMD documentation describing default IDs/pins.robert-hh
Changes are: - Add the RX/TX pins to the table. In most cases these are the D0/D1 pins. - Document the ability for the instantiation of the default devices without submitting ID or pins. - Improve the example script creating the pin list to show multiple name assigments to the same pin. - Fix errors in the pinout document. Signed-off-by: robert-hh <robert@hammelrath.com>
2025-02-07docs/samd/pinout: Add pinout for the Generic SAMD board types.robert-hh
The table shows the devices available at the pin and the respective package letter. Signed-off-by: robert-hh <robert@hammelrath.com>
2025-02-07docs/samd/pinout: Add pinout for Adafruit NeoKey Trinkey and QT Py.robert-hh
Only pins accessible at the board are shown. Signed-off-by: robert-hh <robert@hammelrath.com>
2024-11-18ports: Make PWM duty_u16 have an upper value of 65535 across all ports.robert-hh
The following ports used 65536 as the upper value (100% duty cycle) and are changed in this commit to use 65535: esp8266, mimxrt, nrf, samd. Tested that output is high at `duty_u16(65535)` and low at `duty_u16(0)`. Also verified that at `duty_u16(32768)` the high and low pulse have the same length. Partially reverts #10850, commits 9c7ad68165bcd224c94ca6d8f172362cf8000d99 and 2ac643c15bec8c88ece0e944ce58f36d02dfd2dd. Signed-off-by: robert-hh <robert@hammelrath.com>
2024-09-06samd/mphalport: Simplify mp_hal_delay_ms().robert-hh
Do NOT use `mp_hal_delay_us()` for short delays. This was initially done to make short delays precise, but it does not allow for scheduling. Leave using `mp_hal_delay_us()` to user code if needed. Signed-off-by: robert-hh <robert@hammelrath.com>
2024-03-07all: Prune trailing whitespace.Phil Howard
Prune trailing whitespace across the whole project (almost), done automatically with: grep -IUrl --color "[[:blank:]]$" --exclude-dir=.git --exclude=*.exp |\ xargs sed -i 's/[[:space:]]*$//' Exceptions: - Skip third-party code in lib/ and drivers/cc3100/ - Skip generated code in bluetooth_init_cc2564C_1.5.c - Preserve command output whitespace in docs, eg: docs/esp8266/tutorial/repl.rst Signed-off-by: Phil Howard <phil@gadgetoid.com>
2024-01-02docs/samd/pinout: Update pinout docs with fixed pin assignment.robert-hh
Fixes a wrong assignment for Sparkfun SAMD51 Thing Plus, and updates the sample script for printing the pin info table. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-11-06docs/samd: Fix the pinout for SAMD21 Itsy Bitsy Express M0.robert-hh
And the "Pin", "GPIO" and "Name" key explanations. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-06-06samd/boards: Rename flash pins consistently for QSPI and SPI.robert-hh
For SAMD21 devices, the board flash signals must be named in pins.csv as FLASH_MOSI, FLASH_MISO, FLASH_SCK, FLASH_CS for creating the SPI object. And rename the QSPI pins to QSPI_xxxx instead of FLASH_xxx. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-06-01docs/samd: Add the pin-out for the Adafruit Metro M4 Airlift board.robert-hh
Signed-off-by: robert-hh <robert@hammelrath.com>
2023-05-23samd/machine_uart: Add support for UART hardware flow control.robert-hh
By specifying rts=pin(x) and/or cts=Pin(x) in the constructor. The pad numbers for the UART pins are fix in this case: TX must be at pad 0, RX at pad 1, RTS at pad 2 and CTS at pad 3. repr(uart) shows the pin names for rts and cts, if set. In case of a RX overflow, the rx interrupt will be disabled instead of just discarding the data. That allows RTS to act. If RTS is inactive, still 2 bytes can be buffered in the FIFO. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-05-04docs/samd: Make use of pin names more consistent in examples.robert-hh
This keeps up with the changed Pin naming scheme.
2023-05-04docs: Update the PWM examples based on recent API improvements.robert-hh
This adds the freq and duty_u16 keyword settings to the constructor, and sometimes other details in the PWM section. For mimxrt a clarification regarding the PWM invert argument was added, and for rp2 a few words were spent on PWM output pairs of a channel/slice.
2023-05-04samd/machine_pwm: Add init() method to PWM and simplify the PWM code.robert-hh
The PWM.init() method has been added. Calling init() without arguments restarts a PWM channel stopped with deinit(). Otherwise single parameters except for "device=n" can be changed again. The device can only be specified once, either in the constructor or the first init() call. Also simplify get_pwm_config() and get_adc_config(), and shrink the PWM object.
2023-02-21samd/mcu: Implement a hardware seed for the SAMD21 random module.robert-hh
By using the phase jitter between the DFLL48M clock and the FDPLL96M clock. Even if both use the same reference source, they have a different jitter. SysTick is driven by FDPLL96M, the us counter by DFLL48M. As a random source, the us counter is read out on every SysTick and the value is used to accumulate a simple multiply, add and xor register. According to tests it creates about 30 bit random bit-flips per second. That mechanism will pass quite a few RNG tests, has a suitable frequency distribution and serves better than just the time after boot to seed the PRNG.
2022-12-14samd: Add a vref=num option to the ADC and DAC constructor.robert-hh
ADC: The argument of vref=num is an integer. Values for num are: SAMD21: 0 INT1V 1.0V voltage reference 1 INTVCC0 1/1.48 Analog voltage supply 2 INTVCC1 1/2 Analog voltage supply (only for VDDANA > 2.0V) 3 VREFA External reference 4 VREFB External reference SAMD51: 0 INTREF internal bandgap reference 1 INTVCC1 Analog voltage supply 2 INTVCC0 1/2 Analog voltage supply (only for VDDANA > 2.0v) 3 AREFA External reference A 4 AREFB External reference B 5 AREFC External reference C (ADC1 only) DAC: The argument of vref=num is an integer. Suitable values: SAMD21: 0 INT1V Internal voltage reference 1 VDDANA Analog voltage supply 2 VREFA External reference SAMD51: 0 INTREF Internal bandgap reference 1 VDDANA Analog voltage supply 2 VREFAU Unbuffered external voltage reference (not buffered in DAC) 4 VREFAB Buffered external voltage reference (buffered in DAC).
2022-11-08docs/samd/pinout: Fix the pin numbering for the default assignments.robert-hh
It still used the 'old' pin numbers.
2022-10-26docs/samd: Add documentation for the samd port.robert-hh
Includes a general overview, a quickref, pinout tables, and the beginnings of a tutorial.