Home

Embedded Pi User Manual

image

Contents

1. AC A 45 7 3 qe 45 7 4 TREO E EAA E A 46 7 5 46 O O C OX Embedded Pi User Manual 1 Introduction Figure 1 1 Embedded Pi board Embedded Pi is a triple play platform for Raspberry Pi 32 bit embedded ARM Blending all three communities together Embedded Pi helps you to get the most out of each platform The Embedded Pi is based on the STMicroelectronics STM32F103 MCU and can operate as a bridge between Raspberry Pi and Arduino shields and in standalone mode as Cortex M3 evaluation board Depending on the jumper placement on the Embedded Pi you can select each of the three modes of operation STM32 Standalone Mode The Embedded Pi works as an Arduino form factor compatible mother board where the STM32 controls the Arduino shields directly without the use of Raspberry Pi More ST Adapter Mode The STM32 controls the Arduino shields and the Raspberry Pi works as the GUI or command line console to send commands data to and receive data from the STM32 More Raspberry Pi Mode The Embedded Pi works as a hardware connection bridge between Raspberry Pi and Arduino shields allowing the Raspberry Pi to interface directly with existing Arduino shields More O O C O
2. NAE LAIL LHD WLL 92QV OSIN LIds 9vd S2QV PM4OS LdS Svd HOYA CLHVSIVSSN LIdS tVd cWLL EOQV YM ZWILL ZOQV XL cLMVSIY LHO zWIL ODQV SLO 01008 LSYN 2145 184 SSA 513 13VSrYOSIW SSA 2 56184 Z_SSA WILD ELUVSMIVEWS ZOZVSSN 2145 2184 SSA HHO CWLL M 22211184 22210184 XLNVO VOS LOZI THO XYNVO TOS LOZVEHD 9 XM PNIL YOS 19221184 4 XL LLMVS VLHO vWIL TIOS 10221984 y LOzV ecad OSIN lV8A 45 LIdS OMS3OVHL CHO cINIL OQL 7 8d LOOS c8d VSSA INIL PHO IALL 62QV IAILL 82QV 0Sd ATOMS OIQMS AtC EIS sao A WS Jo X191 5 SAL OldMS an TE asn 2 2 2 2 LHO LWIW6a 2 LHD 2 2 IsoWweEed 2 5 yos sed 2 2 sS yea 2 SS eed 2 200264 2 2 2
3. 13 3 7 Raspberry 14 3 8 Program 15 3 8 1 15 3 8 2 External Debugger Mode 16 3 9 sno e EE E E E EA E AE 17 eI TED 17 System Clock SOU Gerni 18 SM PEN 18 ODS no DNI ENTE _________ 4_ _ ____________ _6__ __ 19 4 1 STM32 Standalone 19 E OO C OX Embedded Pi User Manual WWW COOCOX Org 4 1 1 Hardware COMMECTIONS EE 19 4 1 2 Software 20 4 2 eene OO 22 4 2 1 Hardware 23 4 2 2 ______ _ ____ 24 4 3 Raspberry Pi 24 4 3 1 Hardware 26 4 3 2 Software 26 uirginem 27 ___________________ ____ 41 2E 0 100 010 0100 mm 45 7 1 Sal co 45 7 2 7
4. 2 514 2 19 6 2 519 2 01008 ETT 13534 sb c9 ib suo 2o 6 LN 300 0L 42 2102 0 lt 300 gt JequinN jueunooq Id 380105 1 gt an 27 S i v S WAAdUEG V 5 vd V 60 V m WAS Y 34001 gt 1825 m HMdI80L0SXL n 7 A _ 1 E 21 55 0 0 tL ee SL Y 9 i SL Ld31 3oS tid v m ud Yasta V 81 10598 125 6 0 lt x Q o 3 34001 ezo 2 5 00882 9 ODIAS 5 WHoTeWued O 9 D t D 2 5 tLLSQ 2 O l 2 _ 30 5 34001 922 EACH 2 LG 892 ml 8 LHO INIL 2d HO 2 1 ZSS 0LQ 2 25570172 9 25080110 isona o 9 zosiWeld_o osina 2 RA 2 vaS vid 2 2 Gosisia 2 ov _ 30 9 34001 eco EACH NOISNVdX3 Id S VM 032 80ld9 5 11 01 9 820149 OSIW60Id9 d31 39S ld OZON ISOW 0LOIdO vcOld9 LV ON
5. NOTE Arduino form factor compatible Interface Embedded Pi Extended Interface Raspberry Pi Interface Please note that the Embedded Pi board comes without any case box and all components are exposed Therefore extra attention must be paid to ESD electrostatic discharge precautions Please make sure there is no static interference when using the board Appropriate ESD protections must be taken and wearing electrostatic equipment is recommended such as wearing an anti static wristband ESD damage can range from subtle performance degradation to complete device failure Precision integrated circuits may be more susceptible to damage because very small parametric changes could cause the device not to meet its published specifications O O C OX Embedded Pi User Manual Embedded Pi contains an Cortex M3 MCU STM32F103RBT6 which belongs to 51 32 1 series of mainstream MCUs The STM32 F1 is a series of mainstream MCUs covering the needs of a large variety of applications in the industrial medical and consumer markets With this series of products ST has pioneered the world of ARM Cortex M microcontrollers and set a milestone in the history of embedded applications High performance with first class peripherals and low power low voltage operation is paired with a high level of integration at accessible prices with a simple architecture and easy to use tools
6. 2 12534 13534 lt ws v uaa 5 0 wosised 0 1 9 9eQ 2 01008 f m v 2 E 13506107 213615800 DOAG AGH p i j 2003 21 2 i d reset 5013 5 318ILVdWOO ONN O C O O C OX Embedded Pi User Manual 44 Embedded Pi User Manual References 1 ARM documentation set for the ARM Cortex M3 CPU processor cores http infocenter arm com help index jsp topic com arm doc subset cortexm m3 index html 2 7 Architecture Reference Manual http infocenter arm com help topic com arm doc ddiOA403c index html 1 STM32F103RBT6 Datasheet http www st com internet com TECHNICAL RESOURCES TECHNICAL LITERATURE DATASHEET CD00161566 pdf 2 STM32F10xxx Flash memory microcontrollers http www st com internet com TECHNICAL RESOURCES TECHNICAL LITERATURE PROGRAM MING MANUAL CD00283419 pdf 3 STM32F10 xxx 20xxx 21xxx L1xxxx Cortex M3 programming manual http www st com internet com TECHNICAL RESOURCES TECHNICAL LITERATURE PROGRAM MING MANUAL CD00228163 pdf 4 008 STM32F10x
7. iw Peripher Peripher Cok Peripher _ ERA d Ee Driver OB Matrix s include Dot Matrix h include cookie h include xhw types h include xhw ints h include xhw nvic h include xhw memmap h include z h Unresolved inclusion xcore h include xhw sysctl h include xhw gpio h include xgpio h define delay Ox1fffff void DotMatrix example void long j Writable Smart Insert 9 19 0 Sign in to 7 S l porn Step 3 Select Components ST STH3ZF103RB Peripheral STM32F1xx xStartup Peripheral STM32F1xx xLowLayer Peripheral Peripheral STM32F1 xx Peripheral STM32F1xx Peripheral STM32F1xx Peripheral STM32F1xx High level functions for NVIC anc STM32F10x Controller area network STM32Fixx Startup Code 2 1 LowLayer Driver 2 1 CORE STMS2Fixx DMA Driver STMS2Fixx GPIO Driver STM32Flxx UART Driver 2 1 SPI Driver H Sign in to 35 E O O C OX Embedded Pi User Manual 12 Click Build button or press F7 to compile and link the program CoIDE 0 CoolCox ColDE workspace Pi Pi_ File Edit View Project Flash Debug Search Help com 5 Device ST RB
8. environment by receiving input from a variety of sensors and can affect its surroundings by controlling lights motors and other actuators Application Layer D Motor Sensor Driver Driver Shield Driver Layer 4 SPI 120 1 UART with flow control 2 pairs of PWM 6 analog inputs 1 1 SPI 1 12C 4 PWM 1 UART 6 analog inputs CooCox Shields Arduino Shields men s Figure 4 1 Block diagram of STM32 Mode eme 4 1 1 Hardware connections The Embedded Pi is compatible with both 5V and 3 3V Arduino shields selectable with jumpers 19 C O O C OX Embedded Pi User Manual www coocox org rg Arduino shields can plug pin to pin onto Embedded Pi via the Arduino footprint I O headers rev3 Arduino form factor compatible interfaces Next to the Arduino form factor compatible interfaces the Embedded Pi also has on board the extended interfaces as SPI UART 12 PWM and CAN making up another set of common footprint for connection with expansion daughter cards which will be developed by CooCox The Embedded Pi allows the SWD JTAG debugging via the SWD JTAG port and programming via the ISP interface as well It can be powered by auto selection via USB connection with an external DC power supply or with the connected Raspberry Pi Embedded Pi Arduino Shield ade 13 TI SSeS LEE nim Power an ee EA nmm wn Bb dmi Aver 0 177 9 SWD JTAG Deb
9. The features of STM32F103RBT6 are listed below 32 bit with ARM Cortex M3 core running at up to 72MHz 128KB Flash for programming 2 SRAM Embedded Internal RC 8MHz and 32 kHz Real Time Clock 16 bit Timers with Input Capture Output Compare and PWM 16 bit 6 ch Advanced Timer 2 16 bit Watchdog Timers SysTick Timer Rich communication interfaces 2 SPI 2 12C 3 USART USB 2 0 Full Speed Interface CAN 2 0B Active 2 12 bit 16 ch A D Converter 3 4 1 Power Supply Like the Arduino mother boards Embedded can be powered via USB connection or with an external DC power supply Besides a connected Raspberry Pi can also supply power to it The power supply is auto selected from these 3 sources External non USB power can come either from an AC to DC adapter wall wart or battery The adapter can be connected by plugging a 2 1mm center positive plug into the board s power jack Leads from a battery or other DC power supply can be inserted in the GND and VIN pin headers of the POWER connector Raspberry Pi can supply power to Embedded Pi by connecting P1 on Raspberry Pi with the Raspberry Pi connector J5 on the Embedded Pi board via the 26 pin IDC cable in the package Embedded Pi can operate on an external supply of 6 to 20 volts If supplied with less than 7V however the 5V pin may supply less than five volts and the board may be unstable If using more 8 O O C OX Embedded Pi
10. ZISOW LLA ZosIWZLa 2 05 614 255 014 cvas eed 129 6 XLNVO IeG vasvia 199 e1a 1541 0514 as LLOQ NEHO ig NI 2SO 1 22350 NI 22550 95 LHD pwrra Evera ex cva WLvC CISOWLIG 51 0214 6 31 114 255 014 c OS 8ed e 19S e d XLNY2JLECI 1 5 814 ied 1551 8501 OMS 1008 3 01 O 0Loos8 8 CAEH 315 1n NI 2S0 0 d 100 LLNV L2d eLuvsn ciod XM 5 01 4 PHO LHD ploawirod eloaweod 0120V 02d 5400 3121 SINL 2 12 At 9LEYCOLACEWLS SSN 3 LHO ZIALL IQL 6 Yd _ OIGMS SWLI E LALL dOSSCVXLINVO SLM 2 5 13 LL Shy LLY VShYOL Vd 2 LLNVShY6vd OOWLHO LALO
11. cOld9 220149 PLON 20139 OINMd 8LOld9 4140149 00 4 0 149 69N OdXL rLOld9 4 2 019S LOId9 0 057 00142 CAE Id LJ AS Id ld 1 4 i g aod V 6 14 V 8 Id za v v 9 V Id V t V 1 I Id lt 5 0b UJ 34001 Tn 3000 GZ eASt 5 uMdas0l0sxL 6 Wed v 8 Id SSJOLG V 1 557010 Id ISOWDLLG Y 9 ISOWDLLG Id V Id LId3T V t 0031 vasita V VOS PLG ld TOSIA 7 12598118 _ 50 ld 34001 3900 Lco 022 43 i z z lt 2 PUN e CY y ow Olde i E 057 v v g 9XZ CHNId i v xuc 2 A gt v 2 gera 2 v eg v 2 terr 2 v v 25107424 2 2 eyed 2 v H2 2 2 v 20 2 2 NM v 2 ov ord 2 viSLO 2 iQ v INEHO 10447620 2 q372uee16 931 s _ 3 5 wore m 2 2 2 828 60 v 2 557014 v 55220 0 2 m _ v
12. target chip and click Next 28 Embedded Pi User Manual 4 Select target chip STM32F103RP from the chip list File Edi Device Select the chip for your target project 1 7 5 Series STM32F103x Device STM32F103RB Toolset ARM 2 B STM32F103C8 Lo STM32F103CB STH32F103R4 amp B STM32F103R6 Lo B STM32F103R8 STM32F103RB Descriptions ST s STM32F103R8 operates at maximum speed of T2MHz and features 128 Kbytes of Flash and 20 Kbytes of SRAM 2 105 STM32F103RD E AB STN32F 103RE sms wf Key Parameters Embedded Internal RC SMHz and 32kHz Real Time Clock 16 bit Timers with Input Capture 4 334 Camnaxa and PWM lt Back Next gt Cancel 5 After clicking Finish CoIDE will create a project containing a main c file for you and show the Repository window which contains all code components of STM32F103RB CoIDE 0 f Coolox ColDE workspace Pi Pi_ File Edit View Project Flash Debug Search Help 55 A ME videte ed y Step 3 Select Components ST STM32F103RB COMMON B C Library Implement the minimal functional 11 Retarget printf Implementation of printf spri gt C Semihosting Implementa
13. 1 COX Repository include xsysctl h include xhw sysctl h include xhw gpio h include xgpio h define delay xlfffff void DotMatrix_example void Ek amp 3 9 Program Size text data bss dec hex filename 15300 1916 1572 18788 4964 Pielf BUILD SUCCESSFUL Total time 40 seconds Device ST RB Confi El Peripheral COX 4 r Periphe Cok Peripher Device Compile Link Output User Debugger Download Peri phere Compile 4 ptions H FPU iot use FPU Optimization None 00 x Includepaths Defined Symbols Target n 5 2 1 STMS2F10xX MD 3 8 B T CoX Driver Matrix s H Sign in to 36 O C OX Embedded Pi User Manual 14 Select the debug adapter you use the Debugger tab and close the Configuration window to save your configurations CoIDE f CooCox ColDE workspace Pi Pi File Edit View Project Flash Debug Search Help Hi Repository DotMatrix example c Configuration Device ST RB El Peripheral COX 0 Peripher Cok Peripher Cok Peripher _ eas tas ae a Device Compile Link Output
14. User Debugger Download Debugger Hardware Adapter ST Link Port sun gt Clock Hz Startup Run td ARLinkEx CoiNel USB JTAG CoiNel CoLinkEx e Link32 Nu Link Olimex OpenOCD Stellaris ICDI TargetInjEKT Link Advance 1 CoX_Driver Matrix s Semihosting Enable CacheRom En Reset 0 1 Port Humber 2009 b d im H Sign in to montec JTAGkey J Link 15 Click the Download button to download code to flash CoIDE fCoolCox ColDE workspace Pi Pi File Edit View Project Flash Debug Search Help ee ORG irs F Com 23 Devi gt ESL Step 3 Select Components ST STM32F103RB i ted AEN ef CoX Peripheral STM32F1xx xUART CoX 5 2 UART Driver Peripheral STM32F1xx 5 STMS2Fixx SPI Driver Peripheral STM32F1xx xI2C 51 32 1 120 Driver Peripheral STM32F1xx xTimer 2 1 Timer Control Driver Cok Peripheral STM32F1xx xPWM 5 2 PHM Driver Console 53 Flash download infomation D CooCox CoIDE gt D CooCox CoIDE bin coflash exe program STM32F 103RB D CooCox CoIDE workspace Pi Pi Debug bin Erase Done Program Done Verify Done w Pi i Siga in to 37 E O O C OX Embedded Pi User Manual 16
15. 2 pins with multiple functions including PWM and UART The UART function is for ISP download which works together with BOOTO and BOOT1 VIN 454 3V3 DVCC 33 E 200022 2 8 RESET x 10 14 w 2 C_D28 TIM1_CH3 Figure 3 5 Embedded Pi extended custom interfaces right side of the dotted line Table 3 4 IO mapping of Embedded Pi extended custom interfaces PinID Embedded Pi Function STM32F103 IO MCU Peripheral Function PWM P PA9 USART1 TX TIM1 2 PWM P PA10 PA10 USART1 1 CH3 12 O O C OX Embedded Pi User Manual WWW COOCOX Org 3 6 2 Analog Section Embedded Pi extended interfaces include 6 analog inputs 4 of which shared the same MCU interface with the Arduino form factor compatible interfaces due to the limited analog inputs of STM32F103RBT6 The specific IO mapping of the analog pins are as below Table 3 5 IO mapping of Embedded Pi extended analog interfaces PinID Embedded Pi Function STM32F103 IO MCU Peripheral Function Ire 3 6 3 Digital Section Embedded Pi extended interfaces include 16 digital 105 which can also access 1 UART with flow control 2 pairs of differential PWM 1 CAN 1 SPI and 1 The specific 10 mapping of the digital pins are as below Table 3 6 IO mapping of Embedded Pi extended digital interfaces PinID Embedded Pi Function STM32F103 IO MCU Peripheral Function UART RX PA3 USAR
16. Analog Input 5 2 REISN Embedded Pi Board E Embedded Pi Extended Interfaces 2 2 DC 005 1 SPI 112C 1 UART Flow Ctrl 5 7V 16 2 Pairs PWM 6 Analog Input 5 1 Embedded Pi MCU ISP Program Interface Embedded Pi Analog Input External Interface STM32 oO 9 Debug i gt 79997777 C Connecter Arduino Power Interface Arduino ADC Interface Figure 3 1 Hardware block diagram Besides the Arduino form factor compatible interfaces onboard Embedded Pi has some additional SPI UART interfaces and some other extended interfaces like USB and CAN Users can use the MCU onboard or a connected Raspberry Pi to control Arduino shields via the Arduino form factor compatible interfaces The following sections give a detailed introduction of the operation modes and interfaces of Embedded Pi 4 Operation Modes 3 5 Arduino Form factor Compatibility 3 6 Embedded Pi Extended Interfaces and 3 7 Raspberry Pi Connector Embedded Pi has 3 power sources from which the power supply is auto selected USB connection an external DC power supply or a Raspberry Pi For more information refer to 3 4 Power MCU O O C OX Embedded Pi User Manual Embedded Pi contains an Cortex M3 MCU STM32F103RBT6 which belongs to STM32 1 series of mainstream MCUs The STM32 F1 is
17. Writable Smart Insert 3x H Sign in to 39 CoIDE CooCox CoIDE vorkspace Fi Pi Jeet 35 xSysCtlClockSet 72000000 5 5 OSC MAIN DM163PinInit DotMatrixSetGamma 6 xsysetl c DotMatrixOpenLine 9 6 xtimer c DotMatrixScanTimerInit 72000000 100000 B CoX Driver Matrix shield g Dot Matrix c Dot Matrix h xSysCtlDelay delay while 1 II akpoint ix EIE ay DotMatrixShowChar C 0 0 255 0 vSvs Ctlnelav delavi _ 40 WW W COOCOX OFr E O O C OX Embedded Pi User Manual 6 Schematics 2 asn 5 851 ex LH w 0568 f WN HON 174 9974 asn 88N lt asyl 2510 951 eet 980 851 7h NO StLOSLSZL bn asn 2 41 O O C OX Embedded Pi User Manual 8 09791 2102 90 184 95 Jaze 290 290 JequinN 812 Lo 942 SLO 2001 Id Peppequi3 ZHIN8 cA ZHACE WL id KK PHO WILL Pa ENIDE everd_ zra 40190
18. a series of mainstream MCUs covering the needs of a large variety of applications in the industrial medical and consumer markets With this series of products ST has pioneered the world of ARM Cortex M microcontrollers and set a milestone in the history of embedded applications High performance with first class peripherals and low power low voltage operation is paired with a high level of integration at accessible prices with a simple architecture and easy to use tools The features of STM32F103RBT6 are listed below 32 bit with ARM Cortex M3 core running at up to 72MHz 128 Flash for programming 20KB SRAM v Embedded Internal RC 8MHz and 32 kHz Real Time Clock 16 bit Timers with Input Capture Output Compare PWM 16 bit 6 ch Advanced Timer 2 16 bit Watchdog Timers SysTick Timer v Rich communication interfaces 2 SPI 2 12C 3 USART v USB 2 0 Full Speed Interface CAN 2 0B Active v 2 12 bit 16 ch A D Converter Power Jack Arduino Bus Power Switch Raspberry Raspberry Pi _ Connector Bus Enable Pel Embedded Pi Extended Interface JTAG SWD Debug Interface p gt Arduino Form factor Compatible Interface Figure 3 2 Embedded Pi board layout O O C OX Embedded Pi User Manual 15 14 AREF GND 13 NC y B 11 10 3V3 4 5V 8 GND GND VIN 7 16 0 21 Figure 3 3 Pin IDs of the connectors WWWw Coocox orfrg
19. to Yritable 38 O C OX Embedded Pi User Manual 18 Other debug windows be added simply selecting them from View menu CoIDE 1 fCoolCox ColDE workspace Pi Pi E xj File Edit View Debug Search Help 1 e Project PS Project Components Breakpoints Target void DotMatri 4 E9 2 Console 89 int main void CRC Debug B9 DMAIL land Disassembly 88 EXTI GPIOA GPIOA CRL while 1 GPIOA_IDR GPIOA_ODR automat Expressions M o Semihosting J Memory Outline Project Explorer 1010 0101 Registers Peripherals 97 Variables Default Layout void DotMatrix int main void a e xtimer c automatically added by CoIDE B en CoX Driver DotMatrix example Matrix shield while 1 Le Dot Matrix c 88 18 Dot Matrix h im B e example 8 DotMatrix_example ar startup coide c 2 Console 527 Debug Pi configuration Cortex M Application 0 Tools ARM Embedded 4 6 2012g4 bin arm none eabi zdb
20. 3V3 BOOT BOOTO RESET C D26 TIM1 CH2 C D28 TIM1 CH3 Figure 3 4 Pin outs of Arduino form factor power interfaces left side of the dotted line 3 5 2 Analog section Arduino form factor compatible interfaces include 6 analog inputs 2 of which have multiple function for communication However the 2 pins have no analog input function on the Embedded Pi board The specific IO mapping of the pins are as below Table 3 1 IO mapping of Arduino form factor analog interfaces PinID Arduino Function STM3210 MAP MCU Peripheral Function 3 5 3 ICSP SPI Among Arduino form factor compatible interfaces several digital IO and ICSP pins can also be used as SPI interface by multiplexing Embedded Pi has full compliance with Arduino on these pins The specific IO mapping of the ICSP pins are as below Table 3 2 IO mapping of Arduino form factor ICSP interface Arduino Pin Arduino Function STM32 10 MAP MCU Peripheral Function 10 O O C OX Embedded Pi User Manual WWW COOCOX Org ICSP 1 SPI MISO PB14 PB14 SPI2 MISO USART3_ RTS TIM 1 CH2N ICSP 3 SPI SCK PB13 PB13 SPI2 SCK USART3 CTS TIM1 _CH1N ICSP 4 SPI MOSI PB15 PB15 SPI2 MOSI TIM1 3 5 4 Digital section Arduino form factor compatible interfaces include 16 digital IOs which can also access 1 UART 1 SPI and 6 PWM signals by multiplexing Embedded Pi has full compliance with Arduino on these pi
21. Arduino shield drivers list amp Refresh button Preparation A firmware to control the Arduino shields and communicate with the Raspberry Pi should be programmed to the STM32 before hand it can be generated from the project built in CoIDE and be programmed with CoIDE CoFlash or ISP tool The source code to control the Arduino shields are the same with those in the STM32 Standalone Mode while the Protocol Decode Layer code components as shown in Figure 4 4 for communication with the Raspberry Pi will be provided in CoIDE and this page The STM32 controls the Arduino shields and the Raspberry Pi works as the GUI or command line console to send commands data to and receive data from the STM32 This is an advanced mode which extends and strengthens the automation control capability of the Raspberry Pi taking the advantage of STM32F103 NVIC Nested Vectored Interrupt Controller GPIOs and more peripherals like ADC and PWM 22 O O C OX Embedded Pi User Manual WWW COOCOX Org Raspberry Pi GUI or command line console RPI connector I2C SPI UART LCD Motor Sensor Driver Driver Driver Shield Driver Layer Key WiFi ETH Driver Driver 1 SPI 1 12C 1 UART with flow control 2 pairs of PWM 6 analog inputs 1 1 SPI 1 12 4 PWM 1 UART 6 analog inputs CooCox Shields Arduino Shields mme 20 Figure 4 4 Block diagram of ST Adapter Mode 4 2 1 Hardware Connectio
22. Arduino shields or other accessories O O C OX Embedded Pi User Manual AS AS fn dH 3 Hardware Layout and Configuration Embedded Pi STM32 Raspberry Pi olololololololololololololo Board MCU t onnector IIC SPI UART PWM IIC SPI UART ADC GPIO CAN PWM GPIO Bus Switch amp 3V3 5V Voltage level translate E Uu lt lt gt SCL SDA AREF GND SCK MISO MOSI SS PWM IO IO PWM PWM 10 PWM TX RX RPI Connecter HANE M QM NN NEN 1 5012 5 2 10 IO SCK2 MISO2 MOSI2 552 CANRX PWM PWM PWM PWM CTS2 RTS2 TX2 RX2 O O 3 Power Source 2 auto Switch 5 5 Arduino Form factor Compatible USB 7777777777777 Interfaces vid 1SPI 112 1 UART o Arduino Compatible 6
23. Dot Matrix gt xhw memmap include xdebug h include xcore h include xsysctl h include xhw sysctl h include xhw gpio h include xgpio h 4 Dot_Matrix Dh Lr a b Pi Siga in to CoIDE will add the DotMatrix_example c file to the project and the DotMatrix_example function to the main function CoIDE 3 Coolox ColDE workspace Pi Pi_ File Edit View Project Flash Debug Search Help gt Hi Repository chap 3 Device STM32F103RB void DotMatrix example void Cok Peripheral STM32F1xx Embedded PI Config Driver A DMIB3 Dot Matrix with 1 2c int main void automatically added by CoIDE I DotMatrix example while 1 Ei Qg Matrix shield e Dot Matrix c c Dot Matrix h E Gpn example 6 DotMatrix example c Writable Smart Insert 35 8 Sign in to 34 O O C Embedded Pi User Manual WWWw CoOocox org However the DotMatrix_example c file has 2 unsolved inclusions xcore h and xsysctl h CoIDE f CooCox ColDE workspace Pi Pi_ File Edit View Project Flash Debug Search Help G ig Device 5 Ej Peripheral COX 5 Peripher Device 5 RB El Peripheral COX
24. Embedded Pi User Manual Rev 1 0 Release 2013 05 06 CooCox Website www coocox org Forum forum coocox org Techinal master coocox com Market market coocox com O O C OX Embedded Pi User Manual WWW COOCOX Org Catalog Embedded Pi User Manual ccccccsssssssseccccccceeesseecccccsseeesseeecccesssuuseeeccceessuuaseseeesseseuuaeeseeesesaegees 0 a im eT 1 17 3 4 3 Hardware Layout and Configuration cccccccssssecccccesseccecceesseccecceeseceeeseesecessueaeeceeseeeecessneees 5 3 1 BIOG UR UU m 5 3 2 EAEE OAR 7 3 3 8 8 3 4 dep 8 3 4 1 USC 8 3 4 2 f 9 3 5 Arduino Form factor Compatibility nennen 9 3 5 1 POW Cl SO CUO e 10 3 5 2 I TOTEM 10 3 5 3 10 3 5 4 ETT gt gt 11 3 6 Embedded Pi Extended Interfaces cccccssssssesecccceeseeesseeecccessaeesseeeeceeesauaaseeeeeeeenas 12 3 6 1 CUSTOM ao MC CT 12 3 6 2 vei 13 3 6 3
25. T2 RX ADC3 TIM2 23 2 PA2 USART2 TX ADC2 TIM2 CH3 24 UART RTS PA1 1 96 2 RTS ADC1 TIM2 CH2 25 UART CTS PAO PAO WKUP USART2 CTS ADCO TIM2 1 13 O C OX Embedded Pi User Manual SPI SS PAA SPI1 NSS USART2 CK ADCA 33 SPI MOSI PA7 7 5 1 MOSI ADC7 TIM3 CH2 TI M1 CH1N 34 SPI MISO PA6 SPI1 MISO ADC6 TIM3 1 M1 BKIN 37 PB5 PB5 I2C1 SMBAI TIM3 CH2 SPI1 M OSI 38 I2C SDA PB11 PB11 I2C2 SDA USART3 RX TIM2 C H4 I2C SCL PB10 PB10 I2C2 SCL USART3 2 C H3 Raspberry Pi Connector JP5 includes 17 digital 105 which also have the function of SPI or UART As the Arduino form factor compatible interfaces include only 16 digital IOs pin 26 of the Raspberry Pi is ignored on Embedded Pi Below is the IO remapping of Raspberry Pi interfaces on Embedded Pi board Table 3 7 IO remapping of Raspberry Pi interfaces Note Dn n 1 2 3 stands for Digital Pin x Raspberry Pi m Raspberry Pi Interface Function Embedded Pi Pin remap Interface Pin ID OO mo 14 Embedded Pi User Manual LEN LN LEN DN LN LEN LN LN LN MEN MEN moo eme mo LN oo LN LEN LN GPIOS CEO D1 GPIO7 CE1 N 3 8 1 ISP mode In ISP mode a PC programs the MCU onb
26. User Manual WWW COOCOX Org than 12V the voltage regulator may overheat and damage the board The recommended range is 7 to 12 volts Note Embedded Pi has 3 3V and 5V outputs for power supply selectable by JP1 You need to check and select which output to use every time when powering on the stacked Arduino Shields 3 4 2 Power Pins The power pins of Embedded Pi are fully compatible with those of Arduino form factor and listed as below VIN VIN is a voltage input pin connected to the input of the voltage conversion chip onboard outputting 5V As VIN is connected to the power jack with a diode between them the voltage on the pin will be the same with the external power if any ranging from 7 to 12V as recommended above 5V This is a 5V output pin with 2 voltage sources 5V from USB connection or an onboard voltage conversion chip if using a 7 to 12V external DC power supply Note Please do not input any external power directly to the pin or your board can be damaged 3V3 This is a 3 3V output pin extended from an onboard voltage conversion chip GND Ground pins Embedded Pi has Arduino form factor compatible interfaces onboard which provide easy access to controlling the Arduino shields We have defined a digital ID for each signal as the name of the pin Embedded User Manual 3 5 1 Power section VIN 45 3V3 DVCC
27. X Embedded Pi User Manual The figure below shows the hardware connections of different modes Embedded Pi Arduino Shield Raspberry Pi SWD JTAG Debugger e g ST Link CoLinkEx J Link CMSIS DAP Embedded Pi is the 17 product Raspberry Pi mode Raspberry Pi group Coocox ST Adapter mode 2 Arduino group 005 STM32 mode amp Cortex M3 group connection Figure 1 2 Hardware connections of 3 operation modes Key Features Provides Raspberry Pi with easy access to abundant Arduino shields J Compatible with both 5V and 3 3V Arduino shields selectable with jumpers Hundreds of Arduino shields available on the market enhance the control capability of Raspberry Pi e g to control Motor sensors etc Brings 32 bit ARM MCU into the world of Arduino 32 bit ARM Cortex M3 STM32F103 MCU operating at 72MHz with 128KB Flash 20KB RAM motor control USB and CAN Hundreds of Arduino shields available on the market with extremely portable drivers provided or to be shared by CooCox and CoFans Acomplete set of FREE CooCox tools for ARM development common footprint next to Arduino footprint for connection with expansion daughter cards which will be developed by CooCox Y Raspberry Pi and the STM32 MCU can work independently or in conjunction with each other to control the
28. a hardware connection bridge between Raspberry Pi and Arduino O O C OX Embedded Pi User Manual WWW COOCOX Org shields allowing the Raspberry Pi to interface directly with existing Arduino shields having number of sensors amp control to interact with external environment It offers all the possibilities of connecting digital and analog sensors using the common footprint of Arduino but with the power and capabilities of Raspberry Pi Raspberry Pi GUI or command line console RPI connector I2C SPI UART Embedded Pi Arduino form factor compatible interfaces Arduino Shields Figure 4 6 Block diagram of Raspberry Pi Mode 25 OX Embedded Pi User Manual WWW COOCOX Org 4 3 1 Hardware Connections Embedded Pi Arduino Shield Raspberry Pi Figure 4 7 Hardware connections of Raspberry Pi Mode Note The Embedded Pi Extended Interfaces are not connected with the pins of the Raspberry Pi Connector 4 3 2 Software Resources Arduino community has provided a great many drivers and application examples of the existing Arduino shields for Linux as well as corresponding document The open source library called arduPi enables the drivers and application examples to run in the Raspberry Pi Debian system including most drivers of shield peripherals like GPIO 12C SPI etc Download arduPi for Raspberry Pi Modified arduPi library compatible with th
29. ch component Click DM163 Dot Matrix component and its Example window will popup Click view to view the content of the example file A ES DT 212 7 j ox DotMatrix exam view 77 More Examples for STM32F103RB gt gt title DotMatrix_example c author CooCox date 26 Jan 2013 brief DotMatrix example The above comment is automatically generated by include cookie h 33 Embedded User Manual 10 Click add to add the example file to your project and click Yes to confirm adding I Coolox ColBE vorkspace Pi fi File Edit View Project Flash Debug Search Help gt Y DM163 Dot Matrix LED Controller Driver Examples 3 CO DotMatrix_examy view add 12 Are you sure you want to add the example to project The example file DotMatrix example c will be located in example folder under the project Proje Target TU Yep l xtimer El p CoX Driver Ae Matrix shield c
30. e Embedded Pi Table 4 3 Raspberry Pi mode demos Demo description Blog link Raspberry Pi controls the rotation of the motors Raspberry Pi controls the rotation of the motors Ras Pi Demo and the rotation direction and speed can Arduino Motor Control configured via GUI Shield Raspberry Pi controls the LEDs EN Raspberry Pi controls the LCD via I2C TinkerKit Shield For more demos and divers please visit www coocox org epi html 26 Embedded Pi User Manual 5 Getting Started To get started with the Embedded Pi in ST Adapter mode and Raspberry Pi mode refer to 4 2 2 and 4 3 2 To get started with Embedded Pi in STM32 mode an Arduino shield and CoIDE you can follow the steps below 1 Launch and select Create a New Project from the Welcome window CoIDE Quick Start Create Project Start the _Azard that will guide you through the steps necessary for creating a new project Open a Project pen an existing CoIDE project User Guide CoIDE User Guide PDF version provides details about to use CoIDE 27 2 Specify project name and path and click Next os Project Project Set project name and path Project Name Pi M Use default path Project Path CooCox CoIDE workspace Pi 3 Stay cursor on Chip to create the project based on
31. edded Pi Button ID Name Function Remark RESET Reset the Embedded Pi or the Arduino shields in use 2 BOOTO Select Boot Mode Reference 1 STM32 Flash Programming Manual PM0042 2 Chapter 3 8 1 Table 3 9 Function of LEDs on Embedded Pi Function User LED 1 LED Pin PB13 2 LED Control method PB13 Pin high gt LED ON Green PB13 Pin low gt LED OFF Indicate Power Status Power ON gt LED ON Green Power OFF LED OFF 17 Embedded Pi User Manual Table 3 10 System Clock Source Function of Embedded Pi Clock Source ID Crystal Frequency Function 8MHz System main clock source 32 768KHz RTC input clock source Table 3 11 Function of Embedded Pi Jumpers Jumper ID Function Description Output 3V3 JP1 Bus Power Selection 1 Output 5V Raspberry Pi Bus To configure operation mode Enablement STM32 Bus Enablement To configure operation mode Table 3 12 Operation mode configuration Operation Mode Jumpers Configuration R ee R irs 18 O O C OX Embedded Pi User Manual 4 4 The Embedded Pi has three operation modes selectable by jumpers Refer to 3 12 Jumper The Embedded Pi works as an form factor compatible mother board where the STM32 controls the Arduino shields directly without the use of Raspberry Pi can sense the
32. l l a AS AS Ros o o fn dH 8 n the Peripherals tab select CoX Embedded Pl Config component to add the interface configuration files to the project CoIDE fCoolox ColDE workspace Pi Pi File Edit View Project Flash Debug Search Help ace Device STM32Fi03RB E Peripheral COX 0e Cok Peripheral ST Peripheral ST 7 0 Peripheral ST _ T 31 71 1 5 s ao Project 25 Step 3 ES ES ES EE EST 9 Cok Cok Cok Cok Cox Cok Cok Select Components Peripheral Peripheral Peripheral Peripheral Peripheral Peripheral Peripheral Peripheral Peripheral Peripheral 2 1 2 1 2 1 81 32 STM32F1xx STM32F1xx STM32F1xx STM32F1xx STM32F1xx 2 1 Embedded PI Config xDMA xGPIO xUART xSPI 2 xTimer xRTC xADC ST 5 32 103 STMS2Fixx DMA Driver STM32Fixx GPIO Driver 5 32 1 Driver STMS2Fixx SPI Driver SIMS2Fixx 120 Driver STM32Fixx Timer Control Dri STM32Flxx Driver STMS2Fixx RIC Driver STM3S2Fixx WDT Driver STM32Fixx ADC Driver Config files of embedded M Drivers Others 3 Sign in to 32 9 The Components view shows all selected components and number of examples for ea
33. ld http store iteadstudio com index php main page product info amp cPath 18 amp pr oducts id 500 EB 365 GPS Shield Arduino l http shieldlist org seeedstudio gprs GPRS Shield Development http uk farnell com arduino a000058 board wifi shield w intg antenna dp 22 12785 Arduino WiFi Shield http uk farnell com arduino a000079 l 298 motor control arduino shield dp 20 75346 Arduino Motor Shield For latest shared Arduino shield drivers visit http www coocox org driver shield mc9 html or click Refresh button on the top right corner of the Repository view in CoIDE as shown in the figure below Click the Upload button next to Refresh to share your Arduino shield drivers with others by just 4 steps 21 C O O C OX Embedded Pi User Manual WWW COOCOX Org Step 3 Select Components ST STM32F103RB Shield Drivers gt Shield Components CharMenu HD77480 HITAC GPIO Download lvshuxun WiFi_Shield WiFi Shield STML GPIO SPLU Download CooCox BH Shield ardunio Motor shil GPIO Available CooCox S DM163 Dot 0 163 COMPUL GPIO Available CooCox LCD4884 LCD4884 STMICR GPIO SPI Available 236030037 LCDShield HD77480 HITAC SPI Available CooCox BH Sensor Shield shield GPIO I2C Se Available CooCox fal 4 Manufacturers Chips Peripherals Drivers Others Figure 4 3
34. ns The Raspberry Pi communicates with STM32 via the SPI I2C UART channels of the Raspberry Pi connector which are used as multiplex functions of the digital 10 The Embedded Pi can be powered with the connected Raspberry Pi 23 OX Embedded Pi User Manual Embedded Pi Arduino Shield Raspberry Pi Figure 4 5 Hardware connections of ST Adapter Mode 4 2 2 Software Resources The C source code to send commands data to or receive data from the STM32 running in the Raspberry Pi ARM11 SoC 700MHz Debian wheezy OS with 1080P resolution are provided in CooCox Blog bundling with the STM32 firmware and source code To develop applications in this mode using the Arduino shields supported by CoIDE users just need to develop replace the Protocol Decode Layer code and the C code to run in the Raspberry Pi Debian system following the instruction manuals which will be offered by CooCox team later Table 4 2 ST Adapter mode demos Shield Demo description Blog link A demo for ultrasonic distance measuring can detect Ultrasonic the geomagnetic field and measure the voltage of Demo sliding rheostat AD Demo Motor Shield Raspberry Pi can control motor LED or GPIO of STM32 with commands by invoking command parameters already defined TinkerKit Shield For more demos and divers please visit www coocox org epi html The Embedded Pi works as
35. ns The specific IO mapping of the digital pins are as below Table 3 3 IO mapping of Arduino form factor digital interfaces PinID Arduino Function STM32F103 IO MAP MCU Peripheral Function NE mum _ 15 PA15 JTDI TIM2 1 ETR SPI1 NSS 10 SPI CS PB12 PB12 SPI2 NSS I2C2 SMBAI USART3 CK TIM1_BKIN SPI MOSI PB15 15 2 MOSI TIM1 CH3N 12 SPI MISO 14 14 5 12 MISO USART3 RTS TIM1 2N SPI CLK PB13 PB13 SPI2 SCK USART3 CTS TIM1 1 N 11 C O O C OX Embedded Pi User Manual WWW COOCOX Org e I2C SDA PB7 I2C1 SDA TIMA CH2 USART1 12 5 1 PB6 I2C1_SCL TIM4_CH1 USART1_ TX Note To use D8 Pin ID 8 you need to connect SJ1 to D8 with electric iron and solders STM32 PA15 JP2 TDI 4 lt gt 08 3 2 1 S The Embedded Pi extended interfaces beyond the Arduino form factor compatible interfaces provide stronger control ability on expansion modules The expanded pins from D22 to D45 including 1 SPI 1 12 1 UART with flow control 2 pairs of PWM 6 analog inputs and 1 CAN are introduced by 3 sections below 3 6 1 Custom Section This section is customized according to the features of MCU It includes BOOTO and BOOT1 the special pins of STM32F103RBT6 and
36. oard via the serial port JP7 TX1 and JP7 RX1 refer to section 3 6 1 To use this mode you need to set BOOTO to 1 high level and BOOT1 to O low level which has been done on hardware In this case you only need to press the BOOTO button to enter this mode when Embedded Pi is powered on The next steps are as below 1 Install the ISP tool for Embedded Pi on your or Raspberry Pi There are many ISP tools for PC and ST has provided a version for Windows system only For details please refer to http www st com internet com TECHNICAL RESOURCES TECHNICAL LITERATURE USER MANUAL CD00171488 pdf Raspberry Pi uses the Linux system where no ISP tools are available yet and need to be developed 2 Disconnect Embedded Pi from power 3 4 5 6 O O C OX Embedded Pi User Manual WWW COOCOX Org Connect the ISP interface on Embedded Pi with your PC or Raspberry Pi according to the instruction of the ISP tool Figure 3 5 shows the pins of the ISP interface on Embedded Pi When using a PC to program Embedded Pi an RS232 voltage conversion chip is needed between to convert the TTL voltage level of Embedded Pi to the RS232 voltage level of PC Configure JP1 to select the bus voltage between 3 3V and 5V according to the Arduino shields in use For configuration information of JP1 refer to 3 12 Jumper Power on Embedded Pi the power indicator LED will be lighted Press BOOTO and hold it there and press RESET button fo
37. r 1 second then release BOOTO the Embedded Pi will enter the ISP mode Launch the ISP tool to program Embedded Pi 3 8 2 External Debugger Mode Since Embedded Pi has no debugger onboard an external JTAG SWD debugger is needed to program Embedded Pi in the External Debugger Mode like J Link and CoLinkEx The configuration steps are as below 1 2 3 4 5 6 Disconnect Embedded Pi from power Install the debugger driver on PC You can ship this step if you have installed one To install the driver of CoLinkEx refer to http www coocox org Colinkex htm Install the integrated development environment on PC You can ship this step if you have installed one To install CoIDE refer to http www coocox org CooCox ColDE htm Connect Embedded Pi to the PC via the 10 Pin JTAG SWD interface JP2 10 Pin JITAG SWD Interface WC 1 1 LI 2 SWDIO TMS GND 3 o 4 SWDCLK TCLK Li SWO TDO 14 8 NC TD GNU Detece C aRFSFT Figure 3 6 Pin outs of the 10 Pin JTAG SWD interface Power on Embedded Pi the power indicator LED will be lighted Start download and debug your program Note SWD debuggers are supported by default To use a JTAG debugger you need to connect 16 Embedded Pi User Manual WWW COOCOX Org J1 with JTDI first with electronic iron and solders STM32 PA15 JP2 TDI 4 1 gt 08 3 2 1 51 Table 3 8 Function of buttons on Emb
38. start debugging click on the Debug icon or press Ctrl F5 CoIDE 3 Coolox ColDE workspace Pi Pi_ File Edit View Flash Search Help gt Device ST RB Dot Matrix h Peripheral include cookie i Co Peripher include xhw types h include xhw ints h include xhw nvic h include xhw memmap h include xdebug h include xcore h include xsysctl h include xhw sysctl h include xhw gpio h include xgpio h B Gn CoX Driver define delay xifffff amp Matrix s void DotMatrix example void i long j Writable Smart Insert 8 18 H Sign in to 17 If debugging is launched successfully CoIDE will enter the debug mode CoIDE 3 CoolCox ColDE workspace Pi Pi_ File Edit View Debug Search Help void DotMatrix example void int main void B tn Driver E Matrix shield Dot Matrix c 8 Dot Matrix h lel font h automatically added by CoIDE DotMatrix example Pi configuration Cortex M Application B GDB Hardware Debugger 13 2 27 46 07 Su Thread 1 Suspended 1 main 0 08000 Tools ARM Embedded 4 6 2012444 n D workspace Pi Debug Smart Insert Eo 4 H Sign in
39. tion of Semihosting 515 core CMSIS core for Cortex M3 V1 30 SH READ OUT 51 32 10 CMSIS Boot Driver 5 32 10 Reset and clock contro Ceelie redundanev chee Wanufacturers Chips Peripher cts Drivers Otters 0 24 Welcome Chloe 29 Select the driver component of your Arduino shield from the Drivers tab e g select Shield gt DM163 Dot Matrix associated components xGPIO in this case will be automatically selected and CoIDE will add the source code of the selected components to your project 0 f CooCox ColDE rorkspace 2 3 amp amp i s Matrix shield Dot_Matrix 2 Dot Matrix c font h 1114884 LCDShi eld Sensor Shield ardunio 01163 COM 1204884 5 HDTT480 sensor shie 0 Motor Shield 4 595 GPS_Shield EB 365 7 Select View gt Help to open the Help window and view the related information of a selected component ooCox CoIDE CooCox CoIDE workspacesPif 1 7777 S lie O gt CoX Peripheral Library v CoX Shield Lib Shield ardu gt EB 365 GPS v DMShield DM163 Dot Matrix DM163 Dot DMShield move direction L CDShi eld DMShield Softeware Confic DMShied API Sensor_Shiel 31 O O Embedded Pi User Manua
40. ugger e g ST Link CoLinkEx J Link CMSIS DAP CooCox tools Figure 4 2 Hardware connections of STM32 Mode 4 1 2 Software Resources A quick amp easy embedded project can be built in C using CooCox development tools from Embest a FREE and easy to use ARM development tool environment working in Windows XP SP3 Windows Vista Windows 7 system for Cortex M MCU with flash programming amp debugging capability CoIDE CoFlash CoLinkEx etc along with the integrated abundant reusable code shared by CooCox team and CoFans Click here to get started with the Embedded Pi and CoIDE You can also view the demo video htto www coocox org blog p 172 The table below shows the currently available Arduino shield drivers based on CoX which are fully compatible with the Embedded Pi and can be directly selected and added to user s project within Application examples are provided along with the drivers for direct use or reference 20 O C OX Embedded Pi User Manual WWW COOCOX Org Table 4 1 Arduino shield drivers based on CoX Arduino shield Driver link State Product page DFRobot LCD http shieldlist org dfrobot Icd Adafruit Motor M http shieldlist org adafruit motor http store arduino cc ww index php Sensor Shield main page product info amp cPath 16 amp pr oducts 10 89 LCD4884 Shield http shieldlist org dfrobot lcd4884 DM163 Matrix http shieldlist org itead studio colors Shie
41. x Reference Manual http www st com internet com TECHNICAL RESOURCES TECHNICAL LITERATURE REFERENCE MANUAL CD00171190 pdf 5 More resources http www st com internet mcu product 164487 is 1 Embedded Pi Page http www coocox org epi html 2 CooCox Forum http www coocox org Forum index ph 3 CooCox Cox http www coocox org COX html 45 Embedded Pi User Manual WWW COOCOX Org 4 CooCox CoIDE http www coocox org CooCox CoIDE htm 1 Raspberry Pi HomePage http www raspberrypi or 2 Raspberry Pi order links http downloads element14 com raspberryPi1 html 3 FAQs http www raspberrypi org faqs 4 Element14 Raspberry Pi community http www element14 com community groups raspberry pi 1 Arduino HomePage http www arduino cc 2 Arduino Community http arduino or 3 Arduino Shields http www shieldlist or 46

Download Pdf Manuals

image

Related Search

Related Contents

Delfield UC4472N User's Manual  USER MANUAL KIVOS KDB 01s EN 1.0.1  KOKO 2.0 - Austroflamm  Descargar ficha de producto    Bedienungsanleitung  Allied Telesis 8 port 10/100/1000TX Unmanged Switch  JSYSTEME D`ADMISSION ET D`ECHAPPEMENT 1. Aspects généraux  Final Report of EURAMET.EM-S26 Supplementary  

Copyright © All rights reserved.
Failed to retrieve file