Commit Graph

755 Commits

Author SHA1 Message Date
Damien George
0c46419323 windows: Remove remaining traces of old GNU readline support.
GNU readline support for the unix port was removed in
acaa30b604 and in
5e83a75c78, so it's also no longer supported
in the windows port.
2018-12-15 13:54:55 +11:00
Damien George
5146e79490 stm32/boards/NUCLEO_L432KC: Specify L4 OpenOCD config file for this MCU. 2018-12-13 13:45:16 +11:00
Damien George
59f409a787 stm32/boards: Allow OpenOCD stm_flash procedure to accept single FW img.
To support deplop-openocd on target boards that use TEXT0_ADDR only and
have their firmware in a single binary image.
2018-12-13 13:43:10 +11:00
Paul Sokolovsky
fbb8335084 py/objdict: Make .fromkeys() method configurable.
On by default, turned off for minimal/bare-arm. Saves 144 bytes on x86.
2018-12-13 01:20:55 +11:00
Damien George
1db55381b6 stm32/adc: Support 16-bit ADC configuration on H7 MCUs. 2018-12-12 12:51:46 +11:00
Damien George
6cab8daee0 stm32/adc: Increase ADC sampling time for internal sources on H7 MCUs. 2018-12-12 12:51:26 +11:00
Damien George
0555ada277 stm32/adc: Fix calibrated volt/temp readings on H7 by using 16bit scale. 2018-12-12 12:50:37 +11:00
Damien George
1b4031ed64 stm32/extint: Use correct EXTI channels on H7 MCUs for RTC events. 2018-12-12 12:49:23 +11:00
Glenn Ruben Bakke
9e5768a6db nrf/bluetooth: Update BLE stack download script.
Due to new webpages at nordicsemi.com, the download links
for Bluetooth LE stacks were broken.

This patch updates the links to new locations for the current
targets.
2018-12-10 20:42:06 +01:00
Damien George
025d419a77 teensy: Add own uart.h to not rely on stm32's version of the file. 2018-12-10 23:55:11 +11:00
Damien George
dc23978dde stm32/uart: Add ability to have a static built-in UART object.
A static UART is useful for internal peripherals that require a UART and
need to persist outside the soft-reset loop.
2018-12-10 16:21:50 +11:00
Damien George
61ef031687 stm32/uart: Move config of char_width/char_mask to uart.c. 2018-12-10 16:21:50 +11:00
Damien George
6ea45277bf stm32/uart: For UART init, pass in params directly, not via HAL struct.
To provide a cleaner and more abstract C-level interface to the UART.
2018-12-10 16:21:50 +11:00
Damien George
e0c2432503 stm32/uart: Simplify deinit of UART, no need to call HAL.
The HAL just clears UE and then clears all the UART control registers.
2018-12-10 16:21:50 +11:00
Damien George
bc3f0dddac stm32/uart: Remove HAL's UART_HandleTypeDef from UART object struct.
This UART_HandleTypeDef is quite large (around 70 bytes in RAM needed for
each UART object) and is not needed: instead the state of the peripheral
held in its registers provides all the required information.
2018-12-10 16:21:50 +11:00
Damien George
7d7f59d78b stm32/uart: Factor out code to set RX buffer to function uart_set_rxbuf. 2018-12-10 16:21:50 +11:00
Damien George
9690757cca stm32/uart: Rework uart_get_baudrate so it doesn't need a UART handle. 2018-12-10 16:21:50 +11:00
Damien George
524e13b006 stm32/uart: Factor out code from machine_uart.c that computes baudrate. 2018-12-10 16:21:50 +11:00
Damien George
a2271532be stm32: Split out UART Python bindings from uart.c to machine_uart.c. 2018-12-10 16:21:50 +11:00
Damien George
da7355e213 esp32/modmachine: Enable machine.sleep() now that the IDF supports it. 2018-12-06 17:23:27 +11:00
Damien George
9c6c32cc51 esp32/machine_pwm: On deinit stop routing PWM signal to the pin.
Fixes issue #4273.
2018-12-06 17:05:16 +11:00
Damien George
287b02d98a esp32/machine_pwm: Support higher PWM freq by auto-scaling timer res. 2018-12-06 16:43:39 +11:00
Damien George
87623082e3 esp32/machine_uart: Implement UART.sendbreak() method.
The uart_write_bytes_with_break() function requires non-zero data to be
sent before the break, so a standalone break must be synthesised.
2018-12-06 15:40:22 +11:00
boochow
69b7b8fa12 stm32/boards: Add NUCLEO_L432KC board configuration files. 2018-12-06 13:33:29 +11:00
boochow
9d3372bded stm32: Add peripheral support for STM32L432.
The L432 does not have: GPIOD, TIM3, SPI2, ADC dual mode operation, 2-banks
flash.
2018-12-06 13:32:43 +11:00
boochow
1a8baad7ca stm32/boards: Add STM32L432KC chip configuration files.
The pin alternate function information is derived from ST's datasheet
https://www.st.com/resource/en/datasheet/stm32l432kc.pdf
In the datasheet, the line 2 of AF4 includes I2C2 but actually the chip
does not have I2C2 so it is removed.
2018-12-06 13:32:43 +11:00
Damien George
52bec93755 esp8266/machine_uart: Add rxbuf keyword arg to UART constructor/init.
As per the machine.UART documentation, this is used to set the length of
the UART RX buffer.
2018-12-05 23:31:24 +11:00
Damien George
9ddc182ec7 esp32/machine_uart: Add txbuf/rxbuf keyword args to UART construct/init.
As per the machine.UART documentation, these are used to set the length of
the TX and RX buffers.
2018-12-05 16:48:34 +11:00
Damien George
8007d0bd16 stm32/uart: Add rxbuf keyword arg to UART constructor and init method.
As per the machine.UART documentation, this is used to set the length of
the RX buffer.  The legacy read_buf_len argument is retained for backwards
compatibility, with rxbuf overriding it if provided.
2018-12-05 13:24:11 +11:00
Damien George
c6365ffb92 stm32/powerctrl: Add support for standby mode on L4 MCUs.
This maps to machine.deepsleep() which is now supported.
2018-12-05 00:40:05 +11:00
Damien George
a1c81761b1 stm32/mboot: Add documentation for using mboot on PYBv1.x. 2018-12-04 23:48:47 +11:00
Damien George
c040961e91 stm32/boards: Add configuration for putting mboot on PYBv1.x. 2018-12-04 23:48:18 +11:00
Damien George
eed522d69f stm32/mboot: Add support for 4th board LED. 2018-12-04 23:14:30 +11:00
Damien George
13e92e1225 stm32/mboot: Provide led_state_all function to reduce code size. 2018-12-04 23:11:51 +11:00
Damien George
9262f54138 stm32/uart: Always show the flow setting when printing a UART object.
Also change the order of printing of flow so it is after stop (so bits,
parity, stop are one after the other), and reduce code size by using
mp_print_str instead of mp_printf where possible.

See issue #1981.
2018-12-04 19:16:16 +11:00
Damien George
da1d849ad1 stm32,esp8266,cc3200: Use MICROPY_GC_STACK_ENTRY_TYPE to save some RAM. 2018-12-04 18:32:10 +11:00
Damien George
62b4bebf64 esp8266/modnetwork: Wait for iface to go down before forcing power mgmt.
If the STA interface is connected to an AP then it must be fully
disconnected and deactivated before forcing the power management on.
2018-12-04 10:20:45 +11:00
roland
10bddc5c28 stm32/boards/STM32F429DISC: Enable UART as secondary REPL.
The board(s) feature a VCOM through the ST-LINK, this feature is something
to keep around.
2018-12-01 17:30:48 +11:00
Damien George
321d75e087 esp8266/modnetwork: Automatically do radio sleep if no interface active.
Reduces current of device by about 55mA when radio is sleeping.
2018-12-01 17:20:05 +11:00
Damien George
9e2dd93145 esp8266/ets_alt_task: Process idle callback if no other events occurred. 2018-12-01 17:20:05 +11:00
Damien George
485514f57a esp32: Allocate task TCB and stack from system heap not uPy heap.
This is necessary for two reasons: 1) FreeRTOS still needs the TCB data
structure even after vPortCleanUpTCB has been called, so this latter hook
function cannot free the TCB, and there is no where else to safely delete
it (this behaviour has changed recently in the ESP IDF); 2) when using
external SPI RAM the uPy heap is in this external memory but the task stack
must be allocated from internal SRAM.

Fixes issue #3904.
2018-11-28 15:00:45 +11:00
Damien George
0233049b79 esp32/mpthreadport: Prevent deadlocks when deleting all threads.
vTaskDelete now immediately calls vPortCleanUpTCB, which requires the
thread_mutex mutex, so vTaskDelete must be called after this mutex is
released.
2018-11-28 14:30:11 +11:00
Damien George
afd1ce0c15 stm32/powerctrl: Disable IRQs during stop mode to allow reconfig on wake 2018-11-28 12:44:54 +11:00
Damien George
66ca8e9b2c stm32/powerctrl: Move (deep)sleep funcs from modmachine.c to powerctrl.c 2018-11-28 12:22:20 +11:00
Damien George
3a723ad2fe stm32/usb: Fully deinitialise USB periph when it is deactivated. 2018-11-28 12:06:47 +11:00
Damien George
5f67b03e99 stm32/servo: Only initialise TIM5 if it is needed, to save power. 2018-11-28 12:06:24 +11:00
Paul Sokolovsky
80aca27a40 unix/modos: Rename unlink to remove to be consistent with other ports.
We standardized to provide uos.remove() as a more obvious and user-friendly
name.  That's what written in the docs.  The Unix port implementation
predates this convention, so update it now.
2018-11-26 23:27:04 +11:00
Michael Paul Coder
fe452afab2 stm32/flashbdev: Add missing include for irq.h.
This is required for mboot to build.
2018-11-26 16:34:13 +11:00
Tobias Badertscher
9acc32b40f stm32/adc: Add ADC auto-calibration for L4 MCUs.
This increases the precision of the ADC.
2018-11-26 16:16:29 +11:00
Damien George
51482ba925 README: Remove references to "make axtls", it's no longer needed.
Since 0be2ea50e9 axtls is automatically built
as part of the usual "make" build process.
2018-11-15 14:48:17 +11:00