CooCox Embedded Pi User Manual Download Page 15

 

14 

32 

SPI.SS 

PA4 

PA4/SPI1_NSS/USART2_CK/ADC4 

33 

SPI.MOSI 

PA7 

PA7/SPI1_MOSI/ADC7/TIM3_CH2/TI
M1_CH1N 

34 

SPI.MISO 

PA6 

PA6/SPI1_MISO/ADC6/TIM3_CH1/TI
M1_BKIN 

35 

SPI.SCK 

PA5 

PA5/SPI1_SCK/ADC5 

36 

 

PC13 

PC13/ANT1_TAMP 

37 

 

PB5 

PB5/I2C1_SMBAI/TIM3_CH2/SPI1_M
OSI 

38 

I2C.SDA 

PB11 

PB11/I2C2_SDA/USART3_RX/TIM2_C
H4 

39 

I2C.SCL 

PB10 

PB10/I2C2_SCL/USART3_TX/TIM2_C
H3 

 

3.7

 

Raspberry Pi Connector 

Raspberry Pi Connector (JP5) includes 17 digital IOs, which also have the function of IIC, SPI, or 
UART.  As  the  Arduino

TM

  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 
Interface Pin ID 

Raspberry-Pi Interface Function 

Embedded Pi Pin remap 

3.3V Power 

3.3V Power 

5V Power 

5V Power 

GPIO0/SDA 

D14 

5V Power 

NC 

GPIO1/SCL 

D15 

GND 

GND 

GPIO4/GPCLK0 

D9 

GPIO14/TXD 

D1 

GND 

NC 

Summary of Contents for Embedded Pi

Page 1: ...Embedded Pi User Manual Rev 1 0 Release 2013 05 06 Website www coocox org Forum forum coocox org Techinal master coocox com Market market coocox com...

Page 2: ...Compatibility 9 3 5 1 Power section 10 3 5 2 Analog section 10 3 5 3 ICSP SPI 10 3 5 4 Digital section 11 3 6 Embedded Pi Extended Interfaces 12 3 6 1 Custom Section 12 3 6 2 Analog Section 13 3 6 3 D...

Page 3: ...22 4 2 1 Hardware Connections 23 4 2 2 Software Resources 24 4 3 Raspberry Pi Mode 24 4 3 1 Hardware Connections 26 4 3 2 Software Resources 26 5 Getting Started 27 6 Schematics 41 7 References 45 7...

Page 4: ...lacement on the Embedded Pi you can select each of the three modes of operation STM32 Standalone Mode The Embedded Pi works as an ArduinoTM form factor compatible mother board where the STM32 controls...

Page 5: ...c Brings 32 bit ARM MCU into the world of ArduinoTM 32 bit ARM Cortex M3 STM32F103 MCU operating at 72MHz with 128KB Flash 20KB RAM motor control USB and CAN Hundreds of ArduinoTM shields available on...

Page 6: ...SPI 1 I2C 1 UART with Flow Ctrl 2 Pairs PWM 6 Analog Input 1 CAN Arduino Form factor Compatible Interfaces 1SPI 1I2C 4PWM 1 UART 6 Analog Input Figure 3 1 Hardware block diagram Besides the ArduinoTM...

Page 7: ...s 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 lis...

Page 8: ...dded 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 interferen...

Page 9: ...6 bit Watchdog Timers SysTick Timer Rich communication interfaces 2 SPI 2 I2C 3 USART USB 2 0 Full Speed Interface CAN 2 0B Active 2 12 bit 16 ch A D Converter 3 4 Power 3 4 1 Power Supply Like the Ar...

Page 10: ...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...

Page 11: ...terfaces Pin ID ArduinoTM Function STM32 IO MAP MCU Peripheral Function 16 AIN PC0 PC0 ADC10 17 AIN PC1 PC1 ADC11 18 AIN PC2 PC2 ADC12 19 AIN PC3 PC3 ADC13 20 I2C SDA PB7 PB7 I2C1_SDA TIM4_CH2 USART1_...

Page 12: ...he digital pins are as below Table 3 3 IO mapping of Arduino TM form factor digital interfaces Pin ID ArduinoTM Function STM32F103 IO MAP MCU Peripheral Function 0 UART RX PC11 PC11 USART3_RX 1 UART T...

Page 13: ...C 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 BOOT...

Page 14: ...tion Embedded Pi extended interfaces include 16 digital IOs which can also access 1 UART with flow control 2 pairs of differential PWM 1 CAN 1 SPI and 1 IIC The specific IO mapping of the digital pins...

Page 15: ...r JP5 includes 17 digital IOs which also have the function of IIC SPI or UART As the ArduinoTM form factor compatible interfaces include only 16 digital IOs pin 26 of the Raspberry Pi is ignored on Em...

Page 16: ...need to set BOOT0 to 1 high level and BOOT1 to 0 low level which has been done on hardware In this case you only need to press the BOOT0 button to enter this mode when Embedded Pi is powered on The ne...

Page 17: ...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 a...

Page 18: ...SET Reset the Embedded Pi or the ArduinoTM shields in use 2 BOOT0 Select Boot Mode Reference 1 STM32 Flash Programming Manual PM0042 2 Chapter 3 8 1 3 10 LED Table 3 9 Function of LEDs on Embedded Pi...

Page 19: ...ource 3 12 Jumper Table 3 11 Function of Embedded Pi Jumpers Jumper ID Function Description JP1 Bus Power Selection 1 Output 3V3 1 Output 5V JP3 Raspberry Pi Bus Enablement To configure operation mode...

Page 20: ...r actuators STM32 CoX STM32 Library HAL Hardware Layer Application Layer A r d u i n o f o r m f a c t o r c o m p a t i b l e i n t e r f a c e s E P I e x t e n d e d i n t e r f a c e s Arduino Shi...

Page 21: ...re 4 2 Hardware connections of STM32 Mode 4 1 2 Software Resources A quick easy embedded project can be built in C using CooCox development tools from Embest a FREE and easy to use ARM development too...

Page 22: ...eadstudio com index php main_page product_info cPath 18 pr oducts_id 500 ArduinoTM GPRS Shield Under Development http shieldlist org seeedstudio gprs ArduinoTM WiFi Shield Done http uk farnell com ard...

Page 23: ...e 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 STM...

Page 24: ...e d i n t e r f a c e s Arduino Shields LCD Motor Sensor Key Network 1 SPI 1 I2C 1 UART with flow control 2 pairs of PWM 6 analog inputs 1 CAN 1 SPI 1 I2C 4 PWM 1 UART 6 analog inputs CooCox Shields...

Page 25: ...d 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 Ard...

Page 26: ...ll the possibilities of connecting digital and analog sensors using the common footprint of ArduinoTM but with the power and capabilities of Raspberry Pi Raspberry Pi GUI or command line console RPI c...

Page 27: ...on examples to run in the Raspberry Pi Debian system including most drivers of ArduinoTM shield peripherals like GPIO I2C SPI etc Download arduPi for Raspberry Pi Modified arduPi library compatible wi...

Page 28: ...ded 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 ArduinoTM shield and CoIDE you can follow the steps below 1 Launch CoIDE and s...

Page 29: ...28 2 Specify project name and path and click Next 3 Stay the cursor on Chip to create the project based on the target chip and click Next...

Page 30: ...t target chip STM32F103RB from the chip list 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 S...

Page 31: ...of your ArduinoTM shield from the Drivers tab e g select Shield DM163 Dot Matrix associated components xGPIO in this case will be automatically selected and CoIDE will add the source code of the sele...

Page 32: ...31 7 Select View Help to open the Help window and view the related information of a selected component...

Page 33: ...32 8 In the Peripherals tab select CoX Embedded_PI Config component to add the interface configuration files to the project...

Page 34: ...Components view shows all selected components and the number of examples for each component Click DM163 Dot Matrix component and its Example window will popup Click view to view the content of the exa...

Page 35: ...4 10 Click add to add the example file to your project and click Yes to confirm adding CoIDE will add the DotMatrix_example c file to the project and the DotMatrix_example function to the main functio...

Page 36: ...35 However the DotMatrix_example c file has 2 unsolved inclusions xcore h and xsysctl h 11 Select components xCORE and xSysCtl from the Peripherals tab...

Page 37: ...36 12 Click the Build button or press F7 to compile and link the program 13 Click the Configuration button to open the Configuration window...

Page 38: ...37 14 Select the debug adapter you use in the Debugger tab and close the Configuration window to save your configurations 15 Click the Download button to download code to flash...

Page 39: ...38 16 To start debugging click on the Debug icon or press Ctrl F5 17 If debugging is launched successfully CoIDE will enter the debug mode...

Page 40: ...39 18 Other debug windows can be added by simply selecting them from the View menu 19 Use the debug functions like single stepping via the tool bar or debug menu...

Page 41: ...40 20 Set breakpoints in the C code window or the Disassembly window...

Page 42: ...41 6 Schematics...

Page 43: ...42...

Page 44: ...43...

Page 45: ...44...

Page 46: ...rocontrollers http www st com internet com TECHNICAL_RESOURCES TECHNICAL_LITERATURE PROGRAM MING_MANUAL CD00283419 pdf 3 STM32F10xxx 20xxx 21xxx L1xxxx Cortex M3 programming manual http www st com int...

Page 47: ...rry 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 7 5 Ardui...

Reviews: