aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x/main.c
Commit message (Collapse)AuthorAgeFilesLines
* armcm_link: Rename CONFIG_FLASH_START to CONFIG_FLASH_APPLICATION_ADDRESSKevin O'Connor2022-12-141-1/+1
| | | | | | Rename the build symbol name for better clarity on what it represents. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Fix lpc176x buildKevin O'Connor2022-12-141-1/+1
| | | | | | Fix build error introduced in commit 6ba2c3e1. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move bootloader_request() from usbserial.c to main.cKevin O'Connor2022-09-051-0/+20
| | | | | | | Move bootloader_request() function so that it can be used when not using USB. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use full peripheral clock speed; fix UART interfaceKevin O'Connor2021-05-041-1/+1
| | | | | | | | | | | Commit ae89a659 caused a regression in the lpc176x UART handling. After that commit the UART clock divisor would need to be 6.25 on lpc1768 or 7.5 on lpc1769, but the code only supports whole numbers. Set the PCLKSELx registers at startup and return to using full speed peripheral clocks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Do not modify PCLKSELx at runtimeKevin O'Connor2021-03-251-8/+1
| | | | | | | | | The lpc176x has an errata that could cause updates to PCLKSELx to not take effect. Rework the code to use the default peripheral clock speed (25Mhz or 30Mhz) so that this register does not need to be updated at runtime. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Introduce get_pclock_frequency()Kevin O'Connor2021-03-251-1/+9
| | | | | | | Add get_pclock_frequency() - a standard way of obtaining the peripheral clock frequency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Use armcm_main() instead of main() to start board codeKevin O'Connor2019-10-241-4/+5
| | | | | | | | | | The main() function has a special meaning to gcc and using it can result in different code generation. Use armcm_main() to avoid that. Also, invoke SystemInit() from the board specific armcm_main() code. This gives the board code more control over board initialization. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Export MCU definition from armcm_bootKevin O'Connor2019-09-181-5/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_reset: Add a new helper file defining command_reset()Kevin O'Connor2019-09-181-7/+0
| | | | | | Add a generic ARM Cortex-M implementation of the "reset" command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Update code to use armcm_boot mechanismKevin O'Connor2019-08-221-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_timer: Unify udelay() implementationKevin O'Connor2019-06-091-14/+0
| | | | | | | Move the udelay() code from various arm board directories into the src/generic/armcm_timer.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: force minimum usb disconnect timeMatt Baker2019-04-061-0/+15
| | | | | | | Fixes GitHub Issue #1499. Resolves USB hang by forcing a minimum USB disconnection time at boot. Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* command: Always pass a string to the DECL_CONSTANT() macroKevin O'Connor2019-03-171-1/+1
| | | | | | | | Make it clear that the name of the constant being defined is a string. When the value being defined is also a string, use a new DECL_CONSTANT_STR() macro. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move enable_peripheral_clock to main.cKevin O'Connor2019-01-041-0/+21
| | | | | | | Move and rename function to enable_pclock() - in keeping with other ARM ports. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Enable watchdogKevin O'Connor2018-05-251-0/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add initial support for LPC176x processorsKevin O'Connor2018-05-251-0/+31
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>