| Age | Commit message (Collapse) | Author |
|
|
|
|
|
In particular, this makes the L4 .isr_vector section 16K in size so it's
the same as the F4/F7 MCUs. The patch also moves the L4 filesystem to
the end of flash, which allows for 512K filesystem on the 1Mb devices
like the STM32L476DISC.
|
|
|
|
The delay_half parameter must be specified by the port to set up the
timing of the software SPI. This allows the port to adjust the timing
value to better suit its timing characteristics, as well as provide a
more accurate printing of the baudrate.
|
|
It's simpler to just default to always using software SPI if no specific
peripheral id/name is given. To use hardware SPI users must specify a
hardware peripheral id as the first parameter to the SPI constructor.
|
|
|
|
Includes both software and hardware SPI implementations.
|
|
|
|
|
|
There is no need to take src_len and dest_len arguments. The case of
reading-only with a single output byte (originally src_len=1, dest_len>1)
is now handled by using the output buffer as the input buffer, and using
memset to fill the output byte into this buffer. This simplifies the
implementations of the spi_transfer protocol function.
|
|
Files in lib/cmsis are generic for all Cortex-M MCU's
files left in stmhal/cmsis are all STM32 specific.
|
|
|
|
|
|
To reset the flags we should write to the single bit only, not the entire
register (otherwise all other settings in the register are cleared).
Fixes #2457.
|
|
|
|
|
|
One can instead lookup __name__ in the modules dict to get the value.
|
|
Use MP_NOINLINE macro to avoid inlining of init_flash_fs. This helps
to keep stack usage of main() low.
|
|
UART1 can be used even if the switch is enabled. The schematics for this
board make I2C1 available on PB8/PB9, even though it can also be mapped
to PB6/PB7.
See #2396 and #2427.
|
|
The algorithm here should mirror that in the machine.freq() function.
|
|
If a user tries to call `swint()` while interrupt is disabled the flag in
SWIER is set but the interrupt is not triggered and therefore the SWIER bit
is not cleared. When the interrupt is again enabled the next call to
`swint()` won't trigger the IRQ because a 0 to 1 transition will not occur.
|
|
different HAL versions implement GPIO differently (BSRR vs BSRRH+BSRRL),
this way both drivers are portable between different HAL's
|
|
The LCD interface library fails to deassert the chip select of the LCD
after an SPI transmission. Consequently using the SPI with other
peripherals disturbs the state of the LCD. This patch changes
lcd.lcd_out() to deassert CS after each transmission to the LCD.
|
|
machine.POWER_ON is renamed to machine.PWRON_RESET to match other
reset-cause constants that all end in _RESET. The cc3200 port keeps a
legacy definition of POWER_ON for backwards compatibility.
|
|
|
|
|
|
Fixes issue #2176.
|
|
It's useful to be able to use symbolic links to add files and directories
to the set of scripts to be frozen.
|
|
This new config option allows to control whether MicroPython uses its own
internal printf or not (if not, an external one should be linked in).
Accompanying this new option is the inclusion of lib/utils/printf.c in the
core list of source files, so that ports no longer need to include it
themselves.
|
|
This set the CPU frequency to 216 MHz (the max) and
leaves the USB Frequency at 48 MHz.
These settings were copied from one of the HAL examples.
|
|
Usage:
import machine
wdt = machine.WDT(0, 5000) # 5 second timeout
wdt.feed()
Thanks to Moritz for the initial implementation.
|
|
|
|
|
|
This extra forward slash for the starting-point directory is unnecessary
and leads to additional slashes on Max OS X which mean that the frozen
files cannot be imported.
Fixes #2374.
|
|
|
|
This patch makes second and next calls to <socket>.close() a no-op.
It prevents GC from closing the underlying resource after user
already used <socket>.close() explicitly.
fixes #2355
|
|
This updates the print function for machine.Pin to
print out the new constants from the Hardware API defintion
rather than the legacy definitions.
|
|
|
|
TIM3 is no longer special, or at least does not have special IRQ settings.
|
|
It turns out that TIM1 and TIM8 have their own Capture/Compare
interrupt vector. For all of the other timers, the capture/compare
interrupt vector is the same as the update vector.
So we need to add handlers for these vectors and enable them
when using capture/compare callbacks.
During testing of this, I also found that passing a channel callback
into the channel constructor would not enable interrupts properly.
I tested using:
```
>>> pyb.Timer(1, freq=4).channel(1, pyb.Timer.OC_TOGGLE, callback=lambda t: print('.', end=''))
```
I tested the above with channels 1, 4, and 8
|
|
This type was used only for the typedef of mp_obj_t, which is now defined
by the object representation. So we can now remove this unused typedef,
to simplify the mpconfigport.h file.
|
|
Fixing Issue #2243. Main problems were:
- HAL_ADC_GetState(adcHandle) may return other bits set (not only
HAL_ADC_STATE_EOC_REG) when called - so I AND-ed it out as proposed by
mattbrejza in Issue #2243.
- ADC Pin has to be configured as GPIO_MODE_ANALOG_ADC_CONTROL not only
GPIO_MODE_ANALOG.
- Resolved ADC resolution L4 specific (Use L4 define ADC_RESOLUTION_12B).
- Changed setting of Init.EOCSelection toADC_EOC_SINGLE_CONV for L4.
- Added call to ADC_MultiModeTypeDef as this is done on a STM32Cube
generated project too.
- Clean up: Configuration of ADC is done only in ONE function not the same
is done in two functions.
Test is done on PA5 pin of STM32L4Discovery-Kit which is connected to the
DOWN button.
Thanks to mattbrejza for discovering the bug.
|
|
This patch introduces proper ADC Pin definitions in stm32l476_af.csv.
Originally provided by @tobbad.
|
|
|
|
Some boards (like the GHI Electronics G30 Dev Board) don't use
NSS at all and rather just use GPIO chip selects.
|
|
|
|
|
|
|
|
|