summaryrefslogtreecommitdiff
path: root/src/stmf0/stm32f0.h
Commit message (Collapse)AuthorAge
* altos/stmf0: Use double buffering for ChaosKeyKeith Packard2018-01-07
| | | | | | | This improves the USB performance of ChaosKey so that it doesn't NAK during data transfers at all. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: use double buffering for USB rx dataKeith Packard2018-01-07
| | | | | | This also allows us to stop shadowing USB rx buffers in system ram Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Use double buffering for USB tx dataKeith Packard2018-01-07
| | | | | | | This shouldn't have much of an effect, but shows how double buffering works. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Fix HSI clock rate.Keith Packard2017-04-28
| | | | | | It's 8MHz, not 16MHz Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Support timer 2/3 for the beeperKeith Packard2017-02-20
| | | | | | Tested on timer 2, all four channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/arm: Align data so that gcc 5.4 doesn't do byte-accesses. Add -Wcast-alignKeith Packard2016-12-17
| | | | | | | | | | | | | | | | | | | | | | Gcc 5.4.1 tracks alignment of data through assignments, so that a uint32_t pointer which comes from byte-aligned uint8_t data: extern uint8_t foo[]; uint32_t *q = (void *) foo; Fetches and stores through this pointer are done bytewise. This is slow (meh), but if q references a device register, things to bad very quickly. This patch works around this bug in the compiler by adding __attribute__((aligned(4))) tags to some variables, or changing them from uint8_t to uint32_t. Places doing this will now be caught as I've added -Wcast-align to the compiler flags. That required adding (void *) casts, after the relevant code was checked to make sure the compiler could tell that the addresses were aligned. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add USART supportKeith Packard2016-10-30
| | | | | | | The STM32F0 usart can be operated much like the STM32L usart, but the registers are all moved around. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Hook up clock output supportKeith Packard2016-08-02
| | | | | | | This was used to try and not have two xtals on telemini, but failed because the provided clock has too much noise. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add STM32F0 beep and SPI byte API.Keith Packard2016-07-14
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Switch from GPLv2 to GPLv2+Keith Packard2016-07-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Fix external interruptsKeith Packard2016-04-19
| | | | | | | | Missing a reserved address in the registers broke everything nicely, but the priority values were also wrong - stm32f0 exposes 8 bits per priority, like the stm32l, but it uses only the top two bits. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Support HPE clock sourceKeith Packard2016-04-02
| | | | | | Allows the use of crystals instead of requiring USB. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add SPI driver.Keith Packard2016-04-02
| | | | | | | This also changes the DMA interface a bit so we can select for interrupts on only the interesting channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add CRC driverKeith Packard2015-01-27
| | | | | | | Sets up the stm32f0 CRC hardware, exposing inline functions to access it. DMA access is possible, but usbtrng can't use that. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Remove remaining stm32l bits from stm32f0 codeKeith Packard2015-01-27
| | | | | | | These were left over from the stm32f0 initial implementation work; now it's more useful to list only the bits which are valid. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add ADC and DMA APIsKeith Packard2015-01-26
| | | | | | | The ADC api is what USBtrng wants; a way to repeatedly read a single ADC input as fast as possible. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add self-flash support for STM32F042 processorKeith Packard2015-01-25
| | | | | | | Also moves the usual address for applications out of the way of the flash loader. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Initial STMF04x supportKeith Packard2015-01-25
Basic clock configuration, OS support, LED and USB drivers. Signed-off-by: Keith Packard <keithp@keithp.com>