summaryrefslogtreecommitdiff
path: root/src/lpc
Commit message (Collapse)AuthorAge
...
* altos: Turn on -Werror for STM and LPC buildsKeith Packard2013-12-20
| | | | | | | Now that the build completes with no warnings, make future warnings into errors. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Turn on warnings for LPC products tooKeith Packard2013-12-20
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Missing */ in definition of PIO0_4Keith Packard2013-12-20
| | | | | | Would maek using these values pretty hard. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: lpc exti setup was incorrectly testing modeKeith Packard2013-12-20
| | | | | | Check for NOCONFIGURE bit was missing parens Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up warnings for LPC productsKeith Packard2013-12-20
| | | | | | Unused varibles, functions and parameters. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Stop sending SETUP IN when the requested size is reachedKeith Packard2013-12-19
| | | | | | | | The host won't keep asking for SETUP IN packets once it has received the amount of data requested, so check to see if we've sent that much and flip back to IDLE state if so. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Reset less of the device on USB reset.Keith Packard2013-12-18
| | | | | | | | | | This leaves most of the device configured across USB reset, which appears to help when sending a IN reply to the first SETUP packet; without this change, the IN reply would always get a length of 0, which is fine for SET_ADDRESS, but not for GET_DESCRIPTOR_DEVICE, which OS X appears to send before setting the address (go figure). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Build pdclib locally if necessaryKeith Packard2013-12-18
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Be a bit more resistant to toolchain section name changesKeith Packard2013-12-18
| | | | | | | Just add some wild cards on the ends of each section name in case the toolchain changes names in the future. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use all 16 bits of setup packet len when limiting reply lenKeith Packard2013-12-17
| | | | | | | | | We were only using the low 8 bits of the setup packet reply max len, which meant that if the other side sent a weird max len (as Windows 7 does), then we'd truncate our setup reply to whatever was in the low 8 bits of that value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Change flash loader name to just AltosFlashKeith Packard2013-12-08
| | | | | | Remove the software version string from the product name Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Build .ihx files for all arm projectsKeith Packard2013-12-08
| | | | | | The .ihx version can be processed by the java loader Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use installed pdclibKeith Packard2013-10-10
| | | | | | Switch over to the installed pdclib everywhere Signed-off-by: Keith Packard <keithp@keithp.com>
* Add --with parameters to configure for compiler selectionnew-stateKeith Packard2013-10-08
| | | | | | | | This allows the user to specify which compiler to use for each target CPU. Also checks to make sure the arm compiler supports -m0 and -m3 cpu type flags. The build now actually uses the specified compilers too. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Rename easymini-v0.1 to easymini-v1.0Keith Packard2013-10-07
| | | | | | The production boards are the same as the modified v0.1 boards Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc, altos/stm: ARM requires ISB after switching stack pointersKeith Packard2013-10-07
| | | | | | | This sticks a barrier in the CPU to prevent using the wrong stack register past the change. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Add bits for building flash loadersKeith Packard2013-08-31
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'master' into telegps-v0.3Keith Packard2013-08-25
|\
| * altos: Wake up on LPC usart ISR only onceKeith Packard2013-08-25
| | | | | | | | | | | | | | Instead of waking up after every character, wait until the FIFO is empty to reduce overhead Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Set default LPC stack to 512 bytes, Em to 384 bytesKeith Packard2013-08-25
| | | | | | | | | | | | | | The default for lpc has been raised to 512 bytes, but Em doesn't have enough RAM for that. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Use installed arm compiler for LPCKeith Packard2013-08-25
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Stop using burst mode for LPC ADCKeith Packard2013-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | Burst mode doesn't stop after one round of conversions, so we end up getting incorrect values in whatever the last conversion register is. Just use single conversions and take an interrupt per channel. Also, slow down the ADC so that our values are more stable -- just need to make sure we get the whole conversion sequence done 100 times a second. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Wake up on LPC usart ISR only onceKeith Packard2013-08-17
| | | | | | | | | | | | | | Instead of waking up after every character, wait until the FIFO is empty to reduce overhead Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Set default LPC stack to 512 bytes, Em to 384 bytesKeith Packard2013-08-17
| | | | | | | | | | | | | | The default for lpc has been raised to 512 bytes, but Em doesn't have enough RAM for that. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos/lpc: Rename serial port to 'serial0'Keith Packard2013-07-02
|/ | | | | | This lets existing serial port users find the right function. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Add boot loaderKeith Packard2013-06-24
| | | | | | Support the USB boot loader, add USB pull-up support. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Don't disable all interrupts when disabling one interruptKeith Packard2013-06-22
| | | | | | | | | The nvic iser and icer registers read value indicates all enabled interrupts, icer writes disable the set interrupts. Re-writing icer with the current value ends up disabling all interrupts, not exactly what we wanted. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Remove ao_usb_task structureKeith Packard2013-06-22
| | | | | | It's not used Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Enable brown-out-detectorKeith Packard2013-06-22
| | | | | | Make sure the processor does something sensible when the power disappears. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Get rid of ADC filterKeith Packard2013-06-17
| | | | | | | Now that the source of the Vcc noise has been identified, remove the unnecessary ADC filtering. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Get the IRC turned off after boot timeKeith Packard2013-06-17
| | | | | | | This involved carefully moving the USB away from the IRC before turning it off. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Remove spurious semicolonKeith Packard2013-06-16
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Don't disable all of the clocks just yet, USB doesn't workKeith Packard2013-06-16
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Turn off more clocks, disable USART for easyminiKeith Packard2013-06-16
| | | | | | Try to reduce noise on the power supply. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Filter ADC inputsKeith Packard2013-06-15
| | | | | | | They're amazingly noisy on EasyMini, so just filter them as the only thing we use them for is battery and pyro numbers. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Make ADC inputs workKeith Packard2013-06-15
| | | | | | | They're still very unstable (bouncing around a lot), but at least they seem to report useful stuff now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Force idle mode if USB gets an address during boot timeKeith Packard2013-05-19
| | | | | | This lets EasyMini be booted to idle mode by simply plugging it into USB. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Reset SPI device at startup timeKeith Packard2013-05-19
| | | | | | Wasn't doing the reset sequence correctly (write 0, then write 1). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Configuring wrong pin for SPI1 MOSIKeith Packard2013-05-19
| | | | | | Was setting configuration for PIO1_21 instead of PIO0_21. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Allow for alternate SPI SCLK0 pin usageKeith Packard2013-05-19
| | | | | | | SPI SCLK0 can appear on three different pins; let the application configure which one it wants. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Leave SPI enabled all the timeKeith Packard2013-05-19
| | | | | | Might be able to turn it off with some care; more experimentation required. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Create TX/RX busy macros for SPI driverKeith Packard2013-05-19
| | | | | | | Check for both fifo status *and* device busy to make sure the device is idle before we touch any registers. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Fix beeper driverKeith Packard2013-05-19
| | | | | | | | Set prescale limit, not current prescale value (pr instead of pc). Flip output 1 on PWM match (set emc toggle for channel 1). Don't hold counter in reset (turn off CRST bit). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Missing parens around ao_gpio_set macroKeith Packard2013-05-19
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: SPI runs off main clock (48MHz), not sysclk (24MHz)Keith Packard2013-05-19
| | | | | | Update SPI speed definitions to match Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Pull ADC data from the correct registersKeith Packard2013-05-19
| | | | | | | | Was just stepping through register space arbitrarily, which would have worked for EasyMini, but might have failed later if the ADC pin usage wasn't consecutive. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Don't use loader to place USB endpoint data in USB ramKeith Packard2013-05-19
| | | | | | | Instead, just assign a fixed address in registers.ld. This avoids a confusing section in the elf file. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add EXTI_PIN_NOCONFIGURE to exti interface, use for MS5607Keith Packard2013-05-19
| | | | | | | | This asks the EXTI code to not mess with the pin configuration so that the MS5607 driver can get interrupts on the MISO pin while still using it for SPI. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Make EXTI code work.Keith Packard2013-05-19
| | | | | | | | Clear rise/fall bits in ISR to avoid re-entering. Block interrupts around enable/disable bits. Create shared _ao_exti_set_enable function to control mask changes. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Stick USB control structure in USB memoryKeith Packard2013-05-18
| | | | | | | No reason to have that in regular ram, and it means we've got space for large enough stacks now Signed-off-by: Keith Packard <keithp@keithp.com>