aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-02stm32/irq: Define IRQ priorities directly as encoded hardware values.Damien George
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).
2018-05-02stm32/dma: Always deinit/reinit DMA channels on L4 MCUs.Peter D. Gray
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.
2018-05-02stm32/flash: Remove unused src parameter from flash_erase().Damien George
2018-05-02stm32/mphalport: Optimise the way that GPIO clocks are enabled.Damien George
2018-05-02stm32/dac: Implement printing of a DAC object.Damien George
2018-05-02stm32/dac: Make deinit disable the output buffer on H7 and L4 MCUs.Damien George
2018-05-02stm32/adc: Use mp_hal_pin_config() instead of HAL_GPIO_Init().Damien George
This makes ADCAll work correctly on L4 MCUs.
2018-05-02stm32/mphalport: Support ADC mode on a pin for L4 MCUs.Damien George
2018-05-01py/obj.h: Fix math.e constant for nan-boxing builds.Damien George
Due to a typo, math.e was too small by around 6e-11.
2018-05-01stm32/boards: Update pins.csv to include USB pins where needed.Damien George
2018-05-01stm32/dac: Use mp_hal_pin_config() instead of HAL_GPIO_Init().Damien George
2018-05-01stm32/usbd_conf: Use mp_hal_pin_config() instead of HAL_GPIO_Init.Damien George
To reduce dependency on the ST HAL for pin operations.
2018-05-01stm32/mphalport: Add mp_hal_pin_config_speed() to select GPIO speed.Damien George
It should be used after mp_hal_pin_config() or mp_hal_pin_config_alt().
2018-05-01esp32/modnetwork: Allow to get ESSID of AP that STA is connected to.Damien George
Following the same addition to esp8266 port.
2018-05-01esp8266/modnetwork: Allow to get ESSID of AP that STA is connected to.Lars Kellogg-Stedman
This patch enables iface.config('essid') to work for both AP and STA interfaces.
2018-05-01esp32: Add support for the esp32's ULP.Andreas Valder
The ULP is available as esp32.ULP(). See README.ulp.md for basic usage.
2018-05-01py/stream: Use uPy errno instead of system's for non-blocking check.Ayke van Laethem
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).
2018-05-01py/mperrno: Define MP_EWOULDBLOCK as EWOULDBLOCK, not EAGAIN.Damien George
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.
2018-05-01tests/io/bytesio_ext2: Remove dependency on specific EINVAL valueMike Wadsten
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.
2018-05-01stm32/boards/NUCLEO_H743ZI: Enable ADC peripheral.iabdalkader
2018-05-01stm32/adc: Add support for H7 MCU series.iabdalkader
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.
2018-04-27esp32/modules: Add support scripts for WebREPL.Damien George
WebREPL now works on the esp32 in the same way it does on esp8266.
2018-04-27esp32/mpconfigport: Enable webrepl module and socket events.Damien George
2018-04-27esp32/modsocket: Add support for registering socket event callbacks.Damien George
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.
2018-04-27esp32: Add support for and enable uos.dupterm().Damien George
2018-04-27esp32/mphalport: Improve mp_hal_stdout_tx_XXX functions.Damien George
This makes way for enabling uos.dupterm().
2018-04-27stm32/boards/NUCLEO_H743ZI: Use priority 0 for SysTick IRQ.Damien George
This follows how all other boards are configured.
2018-04-27py/nlrthumb: Fix Clang support wrt use of "return 0".Ayke van Laethem
Clang defines __GNUC__ so we have to check for it specifically.
2018-04-27stm32/system_stm32: Reconfigure SysTick IRQ priority for L4 MCUs.Damien George
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.
2018-04-26esp32/mphalport: Improve mp_hal_delay_us so it handles pending events.Damien George
Thanks to @bboser for the initial idea and implementation.
2018-04-26esp32/mphalport: Use esp_timer_get_time instead of gettimeofday.Damien George
It's more efficient and improves accuracy.
2018-04-26docs/library: Add ussl module to library index for unix port.Damien George
2018-04-24stm32/machine_i2c: Provide hardware I2C for machine.I2C on F7 MCUs.Damien George
2018-04-24stm32/i2c: Add low-level I2C driver for F7 MCUs.Damien George
2018-04-24stm32: Rename legacy pyb.I2C helper functions to start with pyb_i2c_.Damien George
2018-04-24stm32: Rename i2c.c to pyb_i2c.c.Damien George
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.
2018-04-24stm32/dac: Support MCUs that don't have TIM4/5 and use new HAL macro.Damien George
2018-04-24stm32: Introduce MICROPY_PY_STM config to include or not the stm module.Damien George
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.
2018-04-23stm32/uart: Allow ctrl-C to work with UARTs put on REPL via os.dupterm.Damien George
2018-04-23stm32/uart: Allow ctrl-C to issue keyboard intr when REPL is over UART.Damien George
2018-04-23stm32/boards/NUCLEO_H743ZI: Enable RNG for this board.iabdalkader
2018-04-23stm32/rng: Set RNG clock source for STM32H7.iabdalkader
2018-04-23extmod/modlwip: Check if getaddrinfo() constraints are supported or not.Damien George
In particular don't issue a warning if the passed-in constraints are actually supported because they are the default values.
2018-04-23tools/upip: Upgrade upip to 1.2.4.Damien George
Uses new pypi.org URL, and now creates a socket with the address parameters returned by getaddrinfo().
2018-04-20esp32/README.md: Fix typo readme.Shanee Vanstone
2018-04-20stm32/sdcard: Implement BP_IOCTL_SEC_COUNT to get size of SD card.Peter D. Gray
2018-04-20docs/library/pyb.ADC: Fix typo of "prarmeter".Damien George
2018-04-20docs/library/pyb.ADC: Remove outdated ADCAll code example.Peter Hinch
2018-04-11tests/pyb: Add test for pyb.ADCAll class.Damien George
2018-04-11stm32/main: Allow a board to configure the label of the flash FS.Damien George
To change the default label a board should define: #define MICROPY_HW_FLASH_FS_LABEL "label"