-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
machine_bitstream: Use the generic version for STM32 as well.
The STM32 mp_hal_ticks_cpu has the unfavourable habit that it checks on each call whether cpu_ticks is enabled. That make the timing somewhat instable. Therefore the calls were renamed from mp_hal_ticks_cpu into mp_hal_ticks_bitstream and mp_hal_ticks_cpu_start into mp_hal_ticks_bitstream_start. In all ports, the respective defines are added to mphalport.h. With that change, the STM32 implementation works pretty precise. For the STM32 M0 MCU, the assembler version is used. Timing varies quite a bit with changing CPU clock frequencies. Testing done with: PYBV11 at 168MHz PBYD_SF6 at 196MHz ESP8266 at both 80 and 160MHz ESP32 at 240MHz RP2 Pico at 125, 180 and 250MHz MIMXRT1050 at 600MHz MIMXRT1020 at 500MHz Testing was done with symmetrical 1000ns cycles. The worst figure is for ESP8266 at 80Mhz, being off at about +62ns for a low phase, -38ns for the high phase, and a total error of 20ns for the full 2000ns cycle.
- Loading branch information
Showing
9 changed files
with
162 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[mapping:msin] | ||
[mapping:main] | ||
archive: libmain.a | ||
entries: | ||
machine_bitstream (noflash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.