This is sample program for Nucleo L152RE (and F401RE & F411RE) mbed-rtos. You need to modify mbed-src and mbed-rtos before compile it.
Dependencies: mbed-rtos mbed-src SetRTC
Fork of GR-PEACH_test_on_rtos_works_well by
Please refer below link.
/users/kenjiArai/notebook/necleo-l152re-rtos-sample-also-for-f401re--f411re-/
debug_tools_L152_F4x1RE/mon_hw_STM32.h
- Committer:
- kenjiArai
- Date:
- 2015-05-20
- Revision:
- 13:d0d1da1fae4c
- Parent:
- 10:1c0f58b9c048
File content as of revision 13:d0d1da1fae4c:
/* * mbed Application program for the ST NUCLEO Board * * Copyright (c) 2010-2015 Kenji Arai / JH1PJL * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: July 7th, 2014 * Revised: May 16th, 2015 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // ROM / Constant data --------------------------------------------------------------------------- char *const rgmsg0 = " 7, 6, 5, 4, 3, 2, 1, 0"; char *const rgmsg1 = "15,14,13,12,11,10, 9, 8,"; char *const cmsg0 = "Use MSI(internal RC)"; char *const cmsg1 = "freq="; char *const cmsg2 = "Use HSI(internal RC/High speed)"; char *const cmsg3 = "Use HSE(External Xtal)"; char *const cmsg4 = "Use PLL with"; char *const cmsg5 = "??? following infromation is not valid !"; char *const cmsg6 = "clock freq. ="; char *const cmsg7 = "No clock"; char *const cmsg8 = "Use LSE(external Xtal)=32768Hz"; char *const cmsg9 = "Use LSI(internal RC/Low speed), RC="; char *const cmsg10= "Use HSE(external Xtal & prescaler)"; char *const cmsg11= "Power Control"; char *const imsg2 = "-->Control Reg."; char *const imsg3 = "-->Status Reg."; char *const imsg4 = "-->Data Reg."; char *const imsg5 = "-->Baud rate Reg."; char *const imsg6 = "-->Own address Reg."; char *const imsg7 = "-->Clock control Reg."; char *const imsg8 = "-->TRISE Reg."; char *const rnmsg0 = " CR1--"; char *const rnmsg1 = " CR2--"; char *const rnmsg2 = " DR---"; char *const rnmsg3 = " SR---"; char *const rnmsg4 = " BRR--"; char *const rnmsg5 = " SR1--"; char *const rnmsg6 = " SR2--"; char *const rnmsg7 = " OAR1-"; char *const rnmsg8 = " OAR2-"; char *const rnmsg9 = " CCR--"; char *const rnmsg10 = " TRISE"; char *const pnmsg0 = "Port "; // 0x00000000 0x0000 0x00000000 0x00000000 0x0000 0x0000 char *const pnmsg1 = "Mode Out-type Out-speed Pup/dwn Input Output"; char *const pnmsga = "GPIOA"; char *const pnmsgb = "GPIOB"; char *const pnmsgc = "GPIOC"; char *const pnmsgd = "GPIOD"; char *const pnmsge = "GPIOE"; char *const pnmsgh = "GPIOH"; char *const pnmsg2 = "Select GPIO"; char *const pnmsg3 = " All"; char *const pnmsg4 = "-->Output"; char *const pnmsg5 = "-->Input"; char *const pnmsg6 = "data"; // Here is redefine part (ST Nucleo F401RE needs here definition) #ifndef GPIO_Mode_IN #define GPIO_Mode_IN 0 #define GPIO_Mode_OUT 1 #define GPIO_Mode_AF 2 #define GPIO_Mode_AN 3 #endif #ifndef GPIO_Speed_400KHz #define GPIO_Speed_400KHz 0 #define GPIO_Speed_2MHz 1 #define GPIO_Speed_10MHz 2 #define GPIO_Speed_40MHz 3 #endif #ifndef GPIO_PuPd_NOPULL #define GPIO_PuPd_NOPULL 0 #define GPIO_PuPd_UP 1 #define GPIO_PuPd_DOWN 2 #endif