aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-03-28stm32/boards/STM32L476DISC: Update to not take the address of pin objs.Damien George
2018-03-28stm32: Change pin_X and pyb_pin_X identifiers to be pointers to objects.Damien George
Rather than pin objects themselves. The actual object is now pin_X_obj and defines are provided so that pin_X is &pin_X_obj. This makes it so that code that uses pin objects doesn't need to know if they are literals or objects (that need pointers taken) or something else. They are just entities that can be passed to the map_hal_pin_xxx functions. This mirrors how the core handles constant objects (eg mp_const_none which is &mp_const_none_obj) and allows for the possibility of different implementations of the pin layer. For example, prior to this patch there was the following: extern const pin_obj_t pin_A0; #define pyb_pin_X1 pin_A0 ... mp_hal_pin_high(&pin_A0); and now there is: extern const pin_obj_t pin_A0_obj; #define pin_A0 (&pin_A0_obj) #define pyb_pin_X1 pin_A0 ... mp_hal_pin_high(pin_A0); This patch should have minimal effect on board configuration files. The only change that may be needed is if a board has .c files that configure pins.
2018-03-28stm32/boards/NUCLEO_H743ZI: Enable SD card support.iabdalkader
2018-03-28stm32/sdcard: Add H7 SD card support.iabdalkader
2018-03-28stm32/dma: Remove H7 SDMMC DMA descriptors.iabdalkader
The H7 SD peripheral has direct connection to MDMA instead.
2018-03-28stm32/boards/NUCLEO_H743ZI: Update to build with new linker management.Damien George
2018-03-28stm32/boards/stm32h743.ld: Remove include of common.ld.Damien George
The relevant common.ld file should now be included explicitly by a particular board.
2018-03-27stm32/boards/stm32f767.ld: Add definition of FLASH_APP.Damien George
This allows F767 MCUs to support a bootloader in the first sector.
2018-03-27stm32/system_stm32: Set VTOR pointer from TEXT0_ADDR.Damien George
2018-03-27stm32/boards: Add common_bl.ld for boards that need a bootloader.Damien George
2018-03-27stm32/boards: Add common_basic.ld for a board to have a single section.Damien George
2018-03-27stm32/Makefile: Allow a board to config either 1 or 2 firmware sections.Damien George
This patch forces a board to explicitly define TEXT1_ADDR in order to split the firmware into two separate pieces. Otherwise the default is now to produce only a single continuous firmware image with all ISR, text and data together.
2018-03-27stm32/Makefile: Rename FLASH_ADDR/TEXT_ADDR to TEXT0_ADDR/TEXT1_ADDR.Damien George
To make it clearer that these addresses are both for firmware text and that they have a prescribed ordering.
2018-03-27stm32/boards: Allow boards to have finer control over the linker script.Damien George
This patch allows a particular board to independently specify the linker scripts for 1) the MCU memory layout; 2) how the different firmware sections are arranged in memory. Right now all boards follow the same layout with two separate firmware section, one for the ISR and one for the text and data. This leaves room for storage (filesystem data) to live between the firmware sections. The idea with this patch is to accommodate boards that don't have internal flash storage and only need to have one continuous firmware section. Thus the common.ld script is renamed to common_ifs.ld to make explicit that it is used for cases where the board has internal flash storage.
2018-03-27stm32/*bdev.c: Eliminate dependency on sys_tick_has_passed.Damien George
Explicitly writing out the implementation of sys_tick_has_passed makes these bdev files independent of systick.c and more reusable as a general component. It also reduces the code size slightly. The irq.h header is added to spibdev.c because it uses declarations in that file (irq.h is usually included implicitly via mphalport.h but not always).
2018-03-27stm32/qspi: Don't take the address of pin configuration identifiers.Damien George
Taking the address assumes that the pin is an object (eg a struct), but it could be a literal (eg an int). Not taking the address makes this driver more general for other uses.
2018-03-27stm32: Consolidate include of genhdr/pins.h to single location in pin.h.Damien George
genhdr/pins.h is an internal header file that defines all of the pin objects and it's cleaner to have pin.h include it (where the struct's for these objects are defined) rather than an explicit include by every user.
2018-03-26stm32/Makefile: Re-enable strict aliasing optimisation for ST HAL files.Damien George
The HAL requires strict aliasing optimisation to be turned on to function correctly (at least for the SD card driver on F4 MCUs). This optimisation was recently disabled with the addition of H7 support due to the H7 HAL having errors with the strict aliasing optimisation enabled. But this is now fixed in the latest stm32lib and so the optimisation can now be re-enabled. Thanks to @chuckbook for finding that there was a problem with the SD card on F4 MCUs with the strict aliasing optimisation disabled.
2018-03-25lib/stm32lib: Update library for fix to H7 SPI strict aliasing error.Damien George
2018-03-20stm32/boards/NUCLEO_H743ZI: Disable uSD transceiver.iabdalkader
There's no uSD Transceiver on this NUCLEO board.
2018-03-20stm32/boards/NUCLEO_H743ZI: Enable hardware I2C support.iabdalkader
2018-03-20stm32/i2c: Add H7 I2C timing configurations.iabdalkader
Found the timing for full (400 KHz) and FM+ (1MHz) in the HAL examples, and used CubeMX to calculate the standard value (100KHz).
2018-03-20stm32/dma: Enable H7 DMA descriptors.iabdalkader
2018-03-19tests/pyb/can: Update to test pyb.CAN restart, state, info, inplace recvDamien George
2018-03-19stm32/can: Add "list" param to CAN.recv() to receive data inplace.Damien George
This API matches (as close as possible) how other pyb classes allow inplace operations, such as pyb.SPI.recv(buf).
2018-03-19travis: Pass -j4 to make to speed up compilation.Damien George
This seems to reduce the Travis build time by roughly 1 minute / 10%.
2018-03-17stm32: Use STM32xx macros instead of MCU_SERIES_xx to select MCU type.Damien George
The CMSIS files for the STM32 range provide macros to distinguish between the different MCU series: STM32F4, STM32F7, STM32H7, STM32L4, etc. Prefer to use these instead of custom ones.
2018-03-17py/objexcept: Make MP_DEFINE_EXCEPTION public so ports can define excs.Damien George
2018-03-16py/makeqstrdefs.py: Optimise by using compiled re's so it runs faster.Damien George
By using pre-compiled regexs, using startswith(), and explicitly checking for empty lines (of which around 30% of the input lines are), automatic qstr extraction is speed up by about 10%.
2018-03-16stm32/can: Use explicit byte extraction instead of casting to word ptr.Damien George
Casting the Data array to a uint32_t* leads to strict aliasing errors on older gcc compilers.
2018-03-16tests/pyb: Update CAN test to expect that auto_restart is printed.Damien George
2018-03-16docs/library/pyb.CAN: Clean up documentation of data constants.Damien George
2018-03-16stm32/can: Add CAN.info() method to retrieve error and tx/rx buf info.Damien George
2018-03-16stm32/can: Add CAN.state() method to get the state of the controller.Damien George
This is useful for monitoring errors on the bus and knowing when a restart is needed.
2018-03-15stm32/can: Add CAN.restart() method so controller can leave bus-off.Damien George
2018-03-15stm32/can: Add "auto_restart" option to constructor and init() method.Damien George
2018-03-15stm32/can: Use enums to index keyword arguments, for clarity.Damien George
2018-03-15stm32/can: Improve can.recv() so it checks for events, eg ctrl-C.Damien George
This patch provides a custom (and simple) function to receive data on the CAN bus, instead of the HAL function. This custom version calls mp_handle_pending() while waiting for messages, which, among other things, allows to interrupt the recv() method via KeyboardInterrupt.
2018-03-15stm32/boards/STM32L476DISC: Enable CAN peripheral.Damien George
This board allows to test CAN support on the L4 series.
2018-03-15docs/library/pyb.CAN: Update markup to use latest doc conventions.Damien George
2018-03-15docs: Fix some references and RST markup to eliminate Sphinx warnings.Damien George
2018-03-15tests/cpydiff: Indent workaround code snippet so it formats correctly.Damien George
2018-03-14esp32/machine_uart: Return None from UART read if no data is available.Damien George
This is instead of returning an empty bytes object, and matches how other ports handle non-blocking UART read behaviour.
2018-03-13drivers/memory/spiflash: Fix bugs in and clean up read/write functions.Damien George
mp_spiflash_read had a bug in it where "dest" and "addr" were incremented twice for a certain special case. This was fixed, which then allowed the function to be simplified to reduce code size. mp_spiflash_write had a bug in it where "src" was not incremented correctly for the case where the data to be written included the caching buffer as well as some bytes after this buffer. This was fixed and the resulting code simplified.
2018-03-13py/obj.h: Move declaration of mp_obj_list_init to objlist.h.Damien George
If this function is used then objlist.h is already included to get the definition of mp_obj_list_t.
2018-03-13py/obj.h: Clean up by removing commented-out inline versions of macros.Damien George
2018-03-13py/misc.h: Remove unused count_lead_ones() inline function.Damien George
This function was never used for unicode/utf8 handling code, or anything else, so remove it to keep things clean.
2018-03-12esp8266/esp_mphal.h: Fix I2C glitching by using input mode for od_high.Damien George
Certain pins (eg 4 and 5) seem to behave differently at the hardware level when in open-drain mode: they glitch when set "high" and drive the pin active high for a brief period before disabling the output driver. To work around this make the pin an input to let it float high.
2018-03-12extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple.Tom Collins
2018-03-11stm32/qspi: Do an explicit read instead of using memory-mapped mode.Damien George
Using an explicit read eliminates the need to invalidate the D-cache after enabling the memory mapping mode, which takes additional time.