- 29 Apr, 2019 1 commit
-
-
Damien George authored
On the STM32F722 (at least, but STM32F767 is not affected) the CK48MSEL bit must be deselected before PLLSAION is turned off, or else the 48MHz peripherals (RNG, SDMMC, USB) may get stuck without a clock source. In such "lock up" cases it seems that these peripherals are still being clocked from the PLLSAI even though the CK48MSEL bit is turned off. A hard reset does not get them out of this stuck state. Enabling the PLLSAI and then disabling it does get them out. A test case to see this is: import machine, pyb for i in range(100): machine.freq(122_000000) machine.freq(120_000000) print(i, [pyb.rng() for _ in range(4)]) On occasion the RNG will just return 0's, but will get fixed again on the next loop (when PLLSAI is enabled by the change to a SYSCLK of 122MHz). Fixes issue #4696.
-
- 28 Apr, 2019 6 commits
-
-
Damien George authored
-
Damien George authored
Otherwise converting large floats to ints will fail (as seen by the builtin_float_hash.py test).
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Andrew Leech authored
Selectable via pyb.usb_mode('VCP+VCP').
-
- 26 Apr, 2019 4 commits
-
-
Damien George authored
The stm32 and nrf ports already had the behaviour that they would first check if the script exists before executing it, and this patch makes all other ports work the same way. This helps when developing apps because it's hard to tell (when unconditionally trying to execute the scripts) if the resulting OSError at boot up comes from missing boot.py or main.py, or from some other error. And it's not really an error if these scripts don't exist.
-
Damien George authored
It will only execute the script if it can be stat'd and is a file.
-
Damien George authored
-
Damien George authored
-
- 25 Apr, 2019 1 commit
-
-
Damien George authored
Prior to this patch, when a lot of data was output by a running script pyboard.py would try to capture all of this output into the "data" variable, which would gradually slow down pyboard.py to the point where it would have large CPU and memory usage (on the host) and potentially lose data. This patch fixes this problem by not accumulating the data in the case that the data is not needed, which is when "data_consumer" is used.
-
- 24 Apr, 2019 1 commit
-
-
Damien George authored
This patch makes the DAC driver simpler and removes the need for the ST HAL. As part of it, new helper functions are added to the DMA driver, which also use direct register access instead of the ST HAL. Main changes to the DAC interface are: - The DAC uPy object is no longer allocated dynamically on the heap, rather it's statically allocated and the same object is retrieved for subsequent uses of pyb.DAC(<id>). This allows to access the DAC objects without resetting the DAC peripheral. It also means that the DAC is only reset if explicitly passed initialisation parameters, like "bits" or "buffering". - The DAC.noise() and DAC.triangle() methods now output a signal which is full scale (previously it was a fraction of the full output voltage). - The DAC.write_timed() method is fixed so that it continues in the background when another peripheral (eg SPI) uses the DMA (previously the DAC would stop if another peripheral finished with the DMA and shut the DMA peripheral off completely). Based on the above, the following backwards incompatibilities are introduced: - pyb.DAC(id) will now only reset the DAC the first time it is called, whereas previously each call to create a DAC object would reset the DAC. To get the old behaviour pass the bits parameter like: pyb.DAC(id, bits). - DAC.noise() and DAC.triangle() are now full scale. To get previous behaviour (to change the amplitude and offset) write to the DAC_CR (MAMP bits) and DAC_DHR12Rx registers manually.
-
- 23 Apr, 2019 1 commit
-
-
Damien George authored
Fixes issue #4702.
-
- 18 Apr, 2019 6 commits
-
-
Damien George authored
-
Damien George authored
To configure the SYSCLK on an F0 enable one of: MICROPY_HW_CLK_USE_HSI48 MICROPY_HW_CLK_USE_HSE MICROPY_HW_CLK_USE_BYPASS
-
Damien George authored
To be consistent with how F4/F7/H7/L4 works in system_stm32.c. The power control peripheral is needed at least for the RTC.
-
Damien George authored
This adds tests for some locations in the code where a memory allocation should raise an exception.
-
Damien George authored
See issue #4655.
-
Daniel O'Connor authored
-
- 16 Apr, 2019 1 commit
-
-
Léa Saviot authored
In CPython the random module is seeded differently on each import, and so this new macro option MICROPY_PY_URANDOM_SEED_INIT_FUNC allows to implement such a behaviour.
-
- 15 Apr, 2019 5 commits
-
-
Daniel O'Connor authored
MODULE_EXAMPLE_ENABLED must be globally defined for the module to be seen and referenced by all parts of the code.
-
Damien George authored
Fixes issue #4693.
-
Damien George authored
The issue described in the comment added here can be seen by forcing a gc_collect() at the start of each call to gc_alloc().
-
Damien George authored
-
Damien George authored
-
- 12 Apr, 2019 2 commits
-
-
Damien George authored
In case (user) source code contains utf-8 encoded data and the default locale is not utf-8. See #4592.
-
Damien George authored
And fix a typo in the comment on this line.
-
- 11 Apr, 2019 4 commits
-
-
Damiano Mazzella authored
-
Damien George authored
-
Damien George authored
If MICROPY_HW_RTC_USE_BYPASS is enabled the RTC startup goes as follows: - RTC is started with LSE in bypass mode to begin with - if that fails to start (after a given timeout) then LSE is reconfigured in non-bypass - if that fails to start then RTC is switched to LSI
-
Damien George authored
-
- 09 Apr, 2019 1 commit
-
-
Damien George authored
To save space, since this board only hase 256k of flash.
-
- 08 Apr, 2019 6 commits
-
-
Damien George authored
The qstr window size is not log-2 encoded, it's just the actual number (but in mpy-tool.py this didn't lead to an error because the size is just used to truncate the window so it doesn't grow arbitrarily large in memory). Addresses issue #4635.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Fixes the regression introduced in ea3c80a5
-
- 05 Apr, 2019 1 commit
-
-
Damien George authored
-