portapack-mayhem/firmware/application
Maescool 920b98f7c9 Upstream merge to make new revision of PortaPack work (#206)
* Power: Turn off additional peripheral clock branches.

* Update schematic with new symbol table and KiCad standard symbols.
Fix up wires.

* Schematic: Update power net labels.

* Schematic: Update footprint names to match library changes.

* Schematic: Update header vendor and part numbers.

* Schematic: Specify (arbitrary) value for PDN# net.

* Schematic: Remove fourth fiducial. Not standard practice, and was taking up valuable board space.

* Schematic: Add reference oscillator -- options for clipped sine or HCMOS output.

* Schematic: Update copyright year.

* Schematic: Remove CLKOUT to CPLD. It was a half-baked idea.

* Schematic: Add (experimental) GPS circuit.
Add note about charging circuit.
Update date and revision to match PCB.

* PCB: Update from schematic change: now revision 20180819.
Diff was extensive due to net renumbering...

* PCB: Fix GPS courtyard to accommodate crazy solder paste recommendation in integration manual.
PCB: Address DRC clearance violation between via and oscillator pad.

* PCB: Update copyright on drawing.

* Update schematic and PCB date and revision.

* gitignore: Sublime Text editor project/workspace files

* Power: Power up or power down peripheral clock at appropriate times, so firmware doesn't freeze...

* Clocking: Fix incorrect shift for CGU IDIVx_CTRL.PD field.

* LPC43xx: Add CGU IDIVx struct/union type.

* Power: Switch off unused IDIV dividers. Make note of active IDIVs and their use.

* HackRF Mode: Upgrade firmware to 2018.01.1 (API 1.02)

* MAX V CPLD: Refactor class to look more like Xilinx CoolRunner II CPLD class.

* MAX V CPLD: Add BYPASS, SAMPLE support.
Rename enter_isp -> enable, exit_isp -> disable.
Use SAMPLE at start of flash process, which somehow addresses the problem where CFM wouldn't load into SRAM (and become the active bitstream) after flashing.

* MAX V CPLD: Reverse verify data checking logic to make it a little faster.

* CPLD: After reprogramming flash, immediately clamp I/O signals, load to SRAM, and "execute" the new bitstream.

* Si5351: Refactor code, make one of the registers more type-safe.
Clock Manager: Track selected reference clock source for later use in user interface.

* Clock Manager: Add note about PPM only affecting Si5351C PLLA, which always runs from the HackRF 25MHz crystal.
It is assumed an external clock does not need adjustment, though I am open to being convinced otherwise...

* PPM UI: Show "EXT" when showing PPM adjustment and reference clock is external.

* CPLD: Add pins and logic for new PortaPack hardware feature(s).

* CPLD: Bitstream to support new hardware features.

* Clock Generator: Add a couple more setter methods for ClockControl registers.

* Clock Manager: Use shared MCU CLKIN clock control configuration constant.

* Clock Manager: Reduce MCU CLKIN driver current. 2mA should be plenty.

* Clock Manager: Remove redundant clock generator output enable.

* Bootstrap: Remove unnecessary ldscript hack to locate SPIFI mode change code in RAM.

* Bootstrap: Get CPU operating at max frequency as soon as possible.
Update SPIFI speed comment.
Make some more LPC43xx types into unions with uint32_t.

* Bootstrap: Explicitly configure IDIVB for SPIFI, despite LPC43xx bootloader setting it.

* Clock Manager: Init peripherals before CPLD reconfig. Do the clock generator setup after, so we can check presence of PortaPack reference clock with the help of the latest CPLD bitstream.

* Clock Manager: Reverse sense of conditional that determines crystal or non-crystal reference source. This is for an expected upcoming change where multiple external options can be differentiated.

* Bootstrap: Consolidate clock configuration, update SPIFI rate comment.

* Clock Manager: Use IDIVA for clock source for all peripherals, instead of PLL1. Should make switching easier going forward.
Don't use IRC as clock during initial clock manager configuration. Until we switch to GP_CLKIN, we should go flat out...

* ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution.

* PortaPack IO: Expose method to set reference oscillator enable pin.

* Pin configuration: Do SPIFI pin config with other pins, in preparation for eliminating separate bootloader.

* Pin configuration: Disable input buffers on pins that are never read.

* Revert "ChibiOS M0: Change default clock speed to 204MHz, since bootstrap now maxes out clock speed before starting M0 execution."

This reverts commit c0e2bb6cc4cc656769323bdbb8ee5a16d2d5bb03.

* Remove unused board files.

* Add LPC43xx functions.

* chibios: Replace code with per-peripheral structs defining clocks, interrupts, and reset bits.

* LPC43xx: Add MCPWM peripheral struct.

* clock generator: Use recommended PLL reset register value.

Datasheet recommends a value. AN619 is quiet on the topic, claims the low nibble is default 0b0000.

* GPIO: Tweak masking of SCU function.

I don't remember why I thought this was necessary...

* HAL: Explicitly turn on timer peripheral clocks used as systicks, during init.

* SCU: Add struct to hold pin configuration.

* PAL: Add functions to address The Glitch.

https://greatscottgadgets.com/2018/02-28-we-fixed-the-glitch/

* PAL/board: New IO initialization code

Declare initial state for SCU pin config, GPIOs. Apply initial state during PAL init. Perform VAA slow turn-on to address The Glitch.

* Merge M0 and M4 to eliminate need for bootstrap firmware

During _early_init, detect if we're running on the M4 or M0.
If M4: do M4-specific core initialization, reset peripherals, speed up SPIFI clock, start M0, go to sleep.
If M0: do all the other things.

* Pins: Miscellaneous SCU configuration tweaks.

* Little code clarity improvement.

* bootstrap: Remove, not necessary.

* Clock Manager: Large re-working to support external references.

* Fix merge conflicts
2019-01-11 06:56:21 +00:00
..
apps Bias-T now works in capture mode 2018-12-18 16:25:21 +00:00
bitmaps Added some skeletons 2018-03-27 12:52:07 +01:00
hw Upstream merge to make new revision of PortaPack work (#206) 2019-01-11 06:56:21 +00:00
protocols Finally found what was eating all the RAM :D 2018-05-15 23:35:30 +01:00
ui Upstream merge to make new revision of PortaPack work (#206) 2019-01-11 06:56:21 +00:00
audio.cpp Fixed mic tx not working the first time it was entered 2018-02-01 11:17:51 +00:00
audio.hpp Merge remote-tracking branch 'upstream/master' 2017-06-21 03:25:27 +01:00
baseband_api.cpp Added tone key mix ratio in Settings -> Audio 2018-05-16 09:45:13 +01:00
baseband_api.hpp Added tone key mix ratio in Settings -> Audio 2018-05-16 09:45:13 +01:00
bitmap.hpp Testing external clock detection and auto-switch 2018-06-12 07:55:12 +01:00
capture_thread.cpp Extract BufferExchange, simplify threading. 2016-10-06 13:38:56 -07:00
capture_thread.hpp Disallow copy constructors/assignments. 2016-11-26 16:52:57 -08:00
chconf.h Initial firmware commit. 2015-07-08 08:39:24 -07:00
clock_manager.cpp Upstream merge to make new revision of PortaPack work (#206) 2019-01-11 06:56:21 +00:00
clock_manager.hpp Upstream merge to make new revision of PortaPack work (#206) 2019-01-11 06:56:21 +00:00
CMakeLists.txt Bias-T now works in capture mode 2018-12-18 16:25:21 +00:00
core_control.cpp Sync with Sharebrained's fw, only Xylos TX works for now 2016-07-27 03:03:40 +02:00
core_control.hpp Sync with Sharebrained's fw, only Xylos TX works for now 2016-07-27 03:03:40 +02:00
de_bruijn.cpp Started writing (copying...) AFSK RX 2017-08-29 09:42:04 +01:00
de_bruijn.hpp Started writing (copying...) AFSK RX 2017-08-29 09:42:04 +01:00
demofont.hpp # This is a combination of 2 commits. 2016-12-24 11:52:11 +01:00
dirty_registers.hpp Add lots of value constructors. 2016-11-26 16:50:44 -08:00
emu_cc1101.cpp Added remaining buttons for TouchTunes remote 2017-09-24 20:05:42 +01:00
event_m0.cpp Testing external clock detection and auto-switch 2018-06-12 07:55:12 +01:00
event_m0.hpp Merge remote-tracking branch 'upstream/master' 2017-07-25 00:20:57 +01:00
ffconf.h FatFs: Update to release R0.12c. 2017-05-03 12:43:45 +01:00
file.cpp Added back scanning in BHT TX 2018-01-09 21:12:19 +00:00
file.hpp Added back scanning in BHT TX 2018-01-09 21:12:19 +00:00
freqman.cpp Capped max entries per Freqman file to 30 due to RAM issue 2017-12-11 02:40:43 +00:00
freqman.hpp Updated freqman files and max entries per file 2018-05-21 19:10:39 +01:00
halconf.h Disable SDC "nice waiting" for performance. 2016-04-10 17:24:28 -07:00
io_file.cpp Merge 'upstream/master' - At least it builds... 2017-01-16 03:45:44 +00:00
io_file.hpp OutputStream (file M0 -> M4 radio) now works 2017-06-23 08:40:22 +01:00
io_wave.cpp Added wav file viewer 2017-10-15 15:53:40 +01:00
io_wave.hpp Application: Fix uninitalized fmt_pcm_t field warning 2018-08-05 15:07:12 -07:00
io.hpp Put Reader, Writer inside "stream" namespace. 2016-10-04 17:13:21 -07:00
irq_controls.cpp IRQ: Make handlers more independent of EventDispatcher. 2017-06-19 16:31:54 -07:00
irq_controls.hpp Initial firmware commit. 2015-07-08 08:39:24 -07:00
irq_lcd_frame.cpp IRQ: Make handlers more independent of EventDispatcher. 2017-06-19 16:31:54 -07:00
irq_lcd_frame.hpp Initial firmware commit. 2015-07-08 08:39:24 -07:00
irq_rtc.cpp IRQ: Make handlers more independent of EventDispatcher. 2017-06-19 16:31:54 -07:00
irq_rtc.hpp Extract RTC interrupt handler into separate files. 2015-08-14 20:57:40 -07:00
log_file.cpp File: Remove puts(), add write_line(), cascade changes in interface. 2016-07-24 20:39:21 -07:00
log_file.hpp Add lots of value constructors. 2016-11-26 16:50:44 -08:00
main.cpp Testing external clock detection and auto-switch 2018-06-12 07:55:12 +01:00
mcuconf.h Merge remote-tracking branch 'upstream/master' 2017-07-25 00:20:57 +01:00
portapack.cpp Upstream merge to make new revision of PortaPack work (#206) 2019-01-11 06:56:21 +00:00
portapack.hpp Testing external clock detection and auto-switch 2018-06-12 07:55:12 +01:00
radio.cpp Added bias-T status icon 2018-01-07 23:13:08 +00:00
radio.hpp CPLD: Remove decimation feature. 2016-08-21 11:31:37 -07:00
receiver_model.cpp Bias-T now works in capture mode 2018-12-18 16:25:21 +00:00
receiver_model.hpp Bias-T now works in capture mode 2018-12-18 16:25:21 +00:00
recent_entries.cpp ADSB position decoding 2017-08-17 12:56:47 +01:00
recent_entries.hpp Hide ui::Rect implementation. 2016-11-28 11:25:27 -08:00
replay_thread.cpp Finally found what was eating all the RAM :D 2018-05-15 23:35:30 +01:00
replay_thread.hpp Added loop option in Replay app 2017-12-11 04:14:54 +00:00
rf_path.cpp Remove repeated code in RF path Config. 2016-08-30 21:26:55 -07:00
rf_path.hpp SYNC 2016-01-31 09:34:24 +01:00
rtc_time.cpp Rename time files/namespace to not conflict with existing defs. 2016-08-21 17:49:06 -07:00
rtc_time.hpp Rename time files/namespace to not conflict with existing defs. 2016-08-21 17:49:06 -07:00
sd_card.cpp Merge 'upstream/master' - At least it builds... 2017-01-16 03:45:44 +00:00
sd_card.hpp Added SD card wiper tool 2017-01-10 18:40:33 +00:00
serializer.cpp Added remaining buttons for TouchTunes remote 2017-09-24 20:05:42 +01:00
serializer.hpp AFSK RX works (only Bell202 for now) 2017-09-02 08:28:29 +01:00
signal.hpp Add lots of value constructors. 2016-11-26 16:50:44 -08:00
spectrum_color_lut.cpp Initial firmware commit. 2015-07-08 08:39:24 -07:00
spectrum_color_lut.hpp Initial firmware commit. 2015-07-08 08:39:24 -07:00
string_format.cpp Testing external clock detection and auto-switch 2018-06-12 07:55:12 +01:00
string_format.hpp Finally found what was eating all the RAM :D 2018-05-15 23:35:30 +01:00
temperature_logger.cpp Tighten up radio API, stop leaking 1st/2nd IF instances. 2016-02-16 10:28:13 -08:00
temperature_logger.hpp Add lots of value constructors. 2016-11-26 16:50:44 -08:00
tone_key.cpp Bias-T now works in capture mode 2018-12-18 16:25:21 +00:00
tone_key.hpp Added back frequency display for CTCSS 2017-12-06 13:20:51 +00:00
touch.cpp Remove a lot of static_cast<>s involving UI structs. 2016-11-29 10:13:56 -08:00
touch.hpp Fix types on touch Filter accumulator/value. 2016-11-28 12:00:56 -08:00
transmitter_model.cpp Added support for multiple sample rates in IQ record 2018-02-22 07:04:19 +00:00
transmitter_model.hpp Added support for multiple sample rates in IQ record 2018-02-22 07:04:19 +00:00
tuning.cpp Rename CPLD "Q_INVERT" to signal to "INVERT". 2016-08-21 11:35:40 -07:00
tuning.hpp Rename CPLD "Q_INVERT" to signal to "INVERT". 2016-08-21 11:35:40 -07:00
ui_baseband_stats_view.cpp View::add_children: Use std::list_initializer as argument. 2016-09-05 14:53:04 -07:00
ui_baseband_stats_view.hpp Wrap message handler registrations in class to subscribe/unsubscribe automatically. 2016-05-11 22:53:09 -07:00
ui_handwrite.cpp Merge remote-tracking branch 'upstream/master' 2017-06-21 03:25:27 +01:00
ui_handwrite.hpp Merge remote-tracking branch 'upstream/master' 2017-06-21 03:25:27 +01:00
ui_loadmodule.cpp Merge 'upstream/master' - At least it builds... 2017-01-16 03:45:44 +00:00
ui_loadmodule.hpp Sync with Sharebrained's fw, only Xylos TX works for now 2016-07-27 03:03:40 +02:00
ui_navigation.cpp Bias-T now works in capture mode 2018-12-18 16:25:21 +00:00
ui_navigation.hpp Testing external clock detection and auto-switch 2018-06-12 07:55:12 +01:00
ui_playdead.cpp Added Bias-T toggle confirmation 2018-01-08 03:47:37 +00:00
ui_playdead.hpp Tones bugfix, numbers station voice files search 2017-03-22 03:21:06 +00:00
ui_record_view.cpp Added support for multiple sample rates in IQ record 2018-02-22 07:04:19 +00:00
ui_record_view.hpp Added support for multiple sample rates in IQ record 2018-02-22 07:04:19 +00:00
ui_sd_card_debug.cpp Add lots of value constructors. 2016-11-26 16:50:44 -08:00
ui_sd_card_debug.hpp Add lots of value constructors. 2016-11-26 16:50:44 -08:00
ui_sd_card_status_view.cpp Frequency manager empty file bugfix 2017-01-30 01:09:00 +00:00
ui_sd_card_status_view.hpp Merge 'upstream/master' - At least it builds... 2017-01-16 03:45:44 +00:00
unistroke.hpp Handwriting fixes 2016-05-11 01:03:42 +02:00
ymdata.hpp # This is a combination of 2 commits. 2016-12-24 11:52:11 +01:00