- 02 May, 2018 10 commits
-
-
Damien George authored
In adcall.py the pyb module may not be imported, so use ADCAll directly. In dac.py the DAC object now prints more info, so update .exp file. In spi.py the SPI should be deinitialised upon exit, so the test can run a second time correctly.
-
Damien George authored
-
Damien George authored
For a given IRQn (eg UART) there's no need to carry around both a PRI and SUBPRI value (eg IRQ_PRI_UART, IRQ_SUBPRI_UART). Instead, the IRQ_PRI_UART value has been changed in this patch to be the encoded hardware value, using NVIC_EncodePriority. This way the NVIC_SetPriority function can be used directly, instead of going through HAL_NVIC_SetPriority which must do extra processing to encode the PRI+SUBPRI. For a priority grouping of 4 (4 bits for preempt priority, 0 bits for the sub-priority), which is used in the stm32 port, the IRQ_PRI_xxx constants remain unchanged in their value. This patch also "fixes" the use of raise_irq_pri() which should be passed the encoded value (but as mentioned above the unencoded value is the same as the encoded value for priority grouping 4, so there was no bug from this error).
-
Peter D. Gray authored
The problem is the existing code which tries to optimise the reinitialisation of the DMA breaks the abstraction of the HAL. For the STM32L4 the HAL's DMA setup code maintains two private vars (ChannelIndex, DmaBaseAddress) and updates a hardware register (CCR). In HAL_DMA_Init(), the CCR is updated to set the direction of the DMA. This is a problem because, when using the SD Card interface, the same DMA channel is used in both directions, so the direction bit in the CCR must follow that. A quick and effective fix for the L4 is to simply call HAL_DMA_DeInit() and HAL_DMA_Init() every time.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
This makes ADCAll work correctly on L4 MCUs.
-
Damien George authored
-
- 01 May, 2018 13 commits
-
-
Damien George authored
Due to a typo, math.e was too small by around 6e-11.
-
Damien George authored
-
Damien George authored
-
Damien George authored
To reduce dependency on the ST HAL for pin operations.
-
Damien George authored
It should be used after mp_hal_pin_config() or mp_hal_pin_config_alt().
-
Damien George authored
Following the same addition to esp8266 port.
-
Lars Kellogg-Stedman authored
This patch enables iface.config('essid') to work for both AP and STA interfaces.
-
Andreas Valder authored
The ULP is available as esp32.ULP(). See README.ulp.md for basic usage.
-
Ayke van Laethem authored
This is a more consistent use of errno codes. For example, it may be that a stream returns MP_EAGAIN but the mp_is_nonblocking_error() macro doesn't catch this value because it checks for EAGAIN instead (which may have a different value than MP_EAGAIN when MICROPY_USE_INTERNAL_ERRNO is enabled).
-
Damien George authored
Most modern systems have EWOULDBLOCK aliased to EAGAIN, ie they have the same value. But some systems use different values for these errnos and if a uPy port is using the system errno values (ie not the internal uPy values) then it's important to be able to distinguish EWOULDBLOCK from EAGAIN. Eg if a system call returned EWOULDBLOCK it must be possible to check for this return value, and this patch makes this now possible.
-
Mike Wadsten authored
If MICROPY_USE_INTERNAL_ERRNO is disabled, MP_EINVAL is not guaranteed to have the value 22, so we cannot depend on OSError(22,). Instead, to support any given port's errno values, without relying on uerrno, we just check that the args[0] is positive.
-
iabdalkader authored
-
iabdalkader authored
ADC3 is used because the H7's internal ADC channels are connected to ADC3 and the uPy driver doesn't support more than one ADC. Only 12-bit resolution is supported because 12 is hard-coded and 14/16 bits are not recommended on some ADC3 pins (see errata). Values from internal ADC channels are known to give wrong values at present.
-
- 27 Apr, 2018 8 commits
-
-
Damien George authored
WebREPL now works on the esp32 in the same way it does on esp8266.
-
Damien George authored
-
Damien George authored
The esp8266 uses modlwip.c for its usocket implementation, which allows to easily support callbacks on socket events (like when a socket becomes ready for reading). This is not as easy to do for the esp32 which uses the ESP-IDF-provided lwIP POSIX socket API. Socket events are needed to get WebREPL working, and this patch provides a way for such events to work by explicitly polling registered sockets for readability, and then calling the associated callback if the socket is readable.
-
Damien George authored
-
Damien George authored
This makes way for enabling uos.dupterm().
-
Damien George authored
This follows how all other boards are configured.
-
Ayke van Laethem authored
Clang defines __GNUC__ so we have to check for it specifically.
-
Damien George authored
After calling HAL_SYSTICK_Config the SysTick IRQ priority is set to 15, the lowest priority. This commit reconfigures the IRQ priority to the desired TICK_INT_PRIORITY value.
-
- 26 Apr, 2018 3 commits
-
-
Damien George authored
Thanks to @bboser for the initial idea and implementation.
-
Damien George authored
It's more efficient and improves accuracy.
-
Damien George authored
-
- 24 Apr, 2018 6 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
i2c.c implements the legacy pyb.I2C class so rename the file to make this explicit, and also to make room for an improved I2C driver.
-
Damien George authored
-
Damien George authored
By default the stm module is included in the build, but a board can now define MICROPY_PY_STM to 0 to not include this module. This reduces the firmware by about 7k.
-