This was copied from minimal/mpconfigport.h, but it doesn't make sense
for general ports.
Add a comment to minimal/mpconfigport.h to explain why it specifically
overrides it.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This was missed in 692d36d779. Probably
never noticed because everything enables `MICROPY_GC_CONSERVATIVE_CLEAR`,
but found via ASAN thanks to @gwangmu & @chibinz.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This provides a way to build a non-DEBUG host binary that still has symbols
and debug information.
Document this for the unix port, and update a comment in the unix port
Makefile.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
The PYBD_SF2 is right on the limit of being able to run this test and so
it succeeds the first two cases and fails the next two with MemoryError.
This causes it to SKIP, but that only works if it's the first thing
printed. So reverse the order of the tests so it fails on the biggest
one first.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This gets the calculation working properly for H5 MCUs, and fixes the
switch statement to switch on csel&7 instead of csel&3.
Signed-off-by: Damien George <damien@micropython.org>
The include of HAL headers should come after the HAL configuration defines,
so that the headers can see whether the defines were made or not, to
provide defaults and configure various things.
Signed-off-by: Damien George <damien@micropython.org>
Integrate DAC support for STM32H5. Implement STM32H5 GPDMA driver. The DMA
driver is largely different from other STM32 variants. To support the DAC
circular mode, memory based linked list DMA descriptors are used.
Signed-off-by: Rene Straub <rene@see5.ch>
Variables that are explicitly fetched always have a value, even if it
is the empty value. However, using .get() hid the error that
shared_bindings_matrix wasn't fetching SRC_SUPERVISOR.
.. so they need a correct row count, which could be the "core.width"
of a 90/180 rotated display.
While I discovered this on the very unusual 320x960 display it could have
affected any framebuffer display that was taller than it was wide,
including sharp memory displays and rgbmatrix displays.
Changes are:
- Run ADC on PCLK/16.
- Verify and optimize timings (ADC_STAB_DELAY_US, ADC_SAMPLETIME_DEFAULT).
- Add support for STM32H5 VBAT and COREVDD channels on ADC2.
- Replace ADC constants in machine_adc_locals_dict_table.
- Convert STM32 literal to channel numbers in adc_config_channel with
corresponding STM32 LL library functions (__LL_ADC_IS_CHANNEL_INTERNAL(),
__LL_ADC_CHANNEL_TO_DECIMAL_NB()).
Reasoning for the second last point: the STM32 driver literals are uint32_t
that don't work with MP_ROM_INT() which handles signed 31 bit integers
only. Introduce enumerator machine_adc_internal_ch_t to define external
channels (0..19), internal channels (256..) and the special channel VREF
(0xffff). Values are converted to STM32 literals with adc_ll_channel()
when required in adc_config_and_read_u16().
Signed-off-by: Rene Straub <rene@see5.ch>
Select ADC instance based on pin information to support ADC2 inputs.
Display ADC instance number similar to machine_adc (STM32H5 only):
<ADC2 on Pin(Pin.cpu.F14, mode=Pin.ANALOG) channel=6>
Signed-off-by: Rene Straub <rene@see5.ch>
Fixed the preliminary STM32H5 ADC support for pyb.ADC:
- Run ADC on PCLK/16.
- Use STM32 ADC library channel literals (__HAL_ADC_DECIMAL_NB_TO_CHANNEL).
- Use correct temperature conversion for H5 (30C, 130C calibration points).
Signed-off-by: Rene Straub <rene@see5.ch>