檢視 Application - Joystick 的原始碼
←
Application - Joystick
前往:
導覽
、
搜尋
由於下列原因,您沒有權限進行 編輯此頁面 的動作:
您請求的操作只有這個群組的使用者能使用:
使用者
您可以檢視並複製此頁面的原始碼。
[[File:Joystick_module.jpg|thumb|200px|Joysticks module]] == HW connection & Timing == <pre> Module STM32F4 ===================== GND GND 5v 5v VRX PA0 - GPIO(ADC) VRY PA1 - GPIO(ADC) SW PE14 - GPIO(Interrupt) </pre> == ADC DMA == <pre> HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC_Buffer, 2); </pre> == GDB for ADC == === console 1 === <pre> tommy@tommy-HP-EliteBook-Folio-1040-G2:~/projects/mbed/ST/stlink.git$ sudo ./st-util 2016-07-10T14:40:18 INFO src/stlink-common.c: Loading device parameters.... 2016-07-10T14:40:18 INFO src/stlink-common.c: Device connected is: F4 device, id 0x10016413 2016-07-10T14:40:18 INFO src/stlink-common.c: SRAM size: 0x30000 bytes (192 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 16384 bytes 2016-07-10T14:40:18 INFO gdbserver/gdb-server.c: Chip ID is 00000413, Core ID is 2ba01477. 2016-07-10T14:40:18 INFO gdbserver/gdb-server.c: Target voltage is 2905 mV. 2016-07-10T14:40:18 INFO gdbserver/gdb-server.c: Listening at *:4242... 2016-07-10T14:40:18 INFO gdbserver/gdb-server.c: Found 6 hw breakpoint registers 2016-07-10T14:40:18 INFO gdbserver/gdb-server.c: GDB connected. </pre> === console 2 === <pre> tommy@tommy-HP-EliteBook-Folio-1040-G2:~/projects/mbed/ST/stm32cubef4.svn/Projects/STM32F4-Discovery/Applications/max7219_x4/SW4STM32/max7219_x4/Debug$ arm-none-eabi-gdb max7219_x4.elf GNU gdb (7.8-0ubuntu1+6) 7.8 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... 0x08004a70 in ?? () /home/tommy/.gdbinit:8: Error in sourced command file: No executable file specified. Use the "file" or "exec-file" command. Reading symbols from max7219_x4.elf...done. (gdb) tar extended-remote :4242 (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/tommy/projects/mbed/ST/stm32cubef4.svn/Projects/STM32F4-Discovery/Applications/max7219_x4/SW4STM32/max7219_x4/Debug/max7219_x4.elf //After programming, press Ctrl + C to stop in somewhere ^C ^CQuit (gdb) bt #0 0x080027d6 in HAL_Delay (Delay=Delay@entry=100) at /home/tommy/projects/mbed/ST/stm32cubef4.svn/Projects/STM32F4-Discovery/Applications/max7219_x4/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c:342 #1 0x08003d1a in StartDefaultTask (argument=<optimized out>) at /home/tommy/projects/mbed/ST/stm32cubef4.svn/Projects/STM32F4-Discovery/Applications/max7219_x4/Src/main.c:761 #2 0x08000d30 in uxListRemove (pxItemToRemove=<optimized out>) at /home/tommy/projects/mbed/ST/stm32cubef4.svn/Projects/STM32F4-Discovery/Applications/max7219_x4/Middlewares/Third_Party/FreeRTOS/Source/list.c:238 Backtrace stopped: previous frame identical to this frame (corrupt stack?) //Watch DMA variable (gdb) print ADC_Buffer //no action $6 = {2364, 2434} (gdb) print ADC_Buffer //VRX to left end $7 = {18, 2440} (gdb) print ADC_Buffer //VRX to right end $9 = {4095, 2436} (gdb) print ADC_Buffer //VRY to up end $10 = {3119, 13} (gdb) print ADC_Buffer //VRY to down end $11 = {2349, 4095} (gdb) </pre>
返回「
Application - Joystick
」頁面
導覽選單
個人工具
登入
命名空間
頁面
討論
變體
檢視
閱讀
檢視原始碼
檢視歷史
更多
搜尋
導覽
首頁
近期變更
隨機頁面
說明
工具
連結至此的頁面
相關變更
特殊頁面
頁面資訊