summaryrefslogtreecommitdiff
path: root/src/stmf0
Commit message (Collapse)AuthorAge
* altos/stmf0: Add a comment about the requirements for using ao_flash_stmKeith Packard2016-11-17
| | | | | | Need HSI clock and the flashing functions loaded in ram. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lambdakey: Get save/restore workingKeith Packard2016-11-17
| | | | | | Need the HSI clock running for the flash hardware to work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add lisp to include directoriesKeith Packard2016-11-17
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Add first lisp bitsKeith Packard2016-11-17
| | | | 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: Switch ADC fast to ADC clockKeith Packard2016-08-08
| | | | | | | Using this slower clock eliminates sampling problems with the ADC and cleans up the chaoskey raw data. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Clean .bin files from flash-loader dirsKeith Packard2016-08-02
| | | | | | | The .bin files are what the DFU utility uses to flash the boot loader using USB. 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: Remove ao_usb_freeKeith Packard2016-06-11
| | | | | | This can't work without a lot more effort. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Rework the sram allocation to save a few text bytesKeith Packard2016-06-11
| | | | | | | Boot loaders were going over 4096 bytes of ROM. I suspect we'll need more serious work soon. Signed-off-by: Keith Packard <keithp@keithp.com>
* stmf0: Do not send more data than requested for GET_DESCRIPTORKeith Packard2016-06-09
| | | | | | | | When Linux boots, it asks for only the first 8 bytes of the device descriptor; we must limit the amount of data sent back to that amount or USB will get wedged. Signed-off-by: Keith Packard <keithp@keithp.com>
* stmf0: Clear all USB state when resetting chip. Wakeup all sleepersKeith Packard2016-06-09
| | | | | | | | | When USB is reset, but the board is not power cycled, all of the internal USB state needs to be reset, and any tasks blocked on sending or receiving packets need to be awoken so they can go wait for USB to start running again. 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/detherm: Add ms5607 to dethermKeith Packard2016-04-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add pwm and exti driversKeith Packard2016-04-02
| | | | 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: Construct .bin files for flash loadersKeith Packard2016-03-18
| | | | | | | This builds a .bin file which can be used with dfu-util instead of using openocd to load the initial flash loader. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fixed timing of panic display LED to be readableBart Massey2016-03-07
| | | | | | | | | | | When we don't have a beeper, there's no way to signal a 'warble' for panic. So, elide that bit. Second, panic can't use the scheduler and timer because those may not be running (or may have failed), and so it uses a delay loop. Add a configurable scale value to the panic loop so that the LED blinks can be read. For stm32f0 devices, scale that by the sysclk value to automatically make them of reasonable length.
* altos/stmf0: Fix build without second USB IN endpointKeith Packard2016-03-05
| | | | | | The code for the second IN endpoint was using the wrong ifdef. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/chaoskey: Add another USB endpoint to read raw dataKeith Packard2016-03-02
| | | | | | | | | | | This replaces having the single output switch based on a pin value and allows us to box the device and still fetch raw data. For now, this will use a special libusb2 program, ao-chaosread, to pull bits as I haven't figure out how to make linux provide two /dev entries for one USB device. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Use device ID as usb serial number if requestedKeith Packard2016-02-15
| | | | | | | | This exposes the hardware device ID (which is unique per-chip) as the USB serial number, avoiding the need to create a custom ROM image for each device. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Fix location of device_id registerKeith Packard2016-02-15
| | | | | | Copied from stm32l and never fixed. Signed-off-by: Keith Packard <keithp@keithp.com>
* Clean up stmf0 adc init.Bart Massey2016-02-08
| | | | | | This better matches the documented cal sequence. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add missing ao_gpio.cKeith Packard2016-02-07
| | | | | | This contains the code for power managing the GPIO pins Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow USB drivers to skip CDC-ACM -specific descriptorsKeith Packard2016-02-07
| | | | | | | | For devices not providing the standard CDC-ACM interface, let them skip the various descriptors and interfaces to provide a more limited set of capabilities. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add suspend/resume supportKeith Packard2016-02-07
| | | | | | Allow USB suspend to suspend USB, GPIOs and master clock. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Allow projects to specify non-default stack sizeKeith Packard2016-02-07
| | | | | | 512 may not be suitable for everyone. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: remove blank line in stmf0/ao_timer.cKeith Packard2016-02-07
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Have fast ADC ring buffer code use wrap-aroundKeith Packard2015-03-20
| | | | | | | | | Instead of requiring that the whole set of returned values fit precisely in the ring, allow for wrap-around so that we can fetch an odd number of ADC values. The previous version required that the fetch amount always be a factor of the ADC buffer size. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Need ao_exti.h for pin configurationKeith Packard2015-03-07
| | | | | | Flash loader uses pin configuration to set up GPIOs for boot selection Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Allocate USB buffers at startupKeith Packard2015-02-28
| | | | | | | This lets the extra allocations used from ao_usb_alloc_buffers be allocated before the first USB connection happens. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Typo in ao_crc_stm.cKeith Packard2015-02-28
| | | | | | Extra semicolon Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Fix fast ADC interfaceKeith Packard2015-02-28
| | | | | | | This was configuring the hardware wrong, and wasn't keeping the output ring full. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add ao_crc_stm.cKeith Packard2015-02-09
| | | | | | Tom discovered that this was missing Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Support PA11/PA12 remappingKeith Packard2015-02-01
| | | | | | | | Small pin-count versions of the STMF0 can remap PA11/PA12 on the same pins as PA9/PA10. These are used by USB, so have the USB driver deal with remapping them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Re-implement fast ADC code for stmf0Keith Packard2015-01-27
| | | | | | | This creates a ring buffer for ADC data so that ADC fetching can run in parallel with other activities. 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/stmf0: Add faster USB pathKeith Packard2015-01-26
| | | | | | | | This adds a way to allocate private USB buffers for sending data without needing to copy it again. It requires ensuring that all accesses are 16 bits aligned to 16 bit boundaries. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Fix linker scripts to make ao_boot workKeith Packard2015-01-26
| | | | | | | | The flash loader ended up assuming ao_boot was at the start of ram, while the application stuck it after the interrupt table (where it needs to go). 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>