UART a tester
Dieser Commit ist enthalten in:
Ursprung
541f57dbef
Commit
ad13b10022
10 geänderte Dateien mit 3653 neuen und 103 gelöschten Zeilen
|
@ -14,5 +14,11 @@ typedef struct
|
|||
void MyTimer_Base_Init(MyTimer_Struct_TypeDef * Timer);
|
||||
void MyTimer_Base_Start(TIM_TypeDef * Timer);
|
||||
void MyTimer_Base_Stop(TIM_TypeDef * Timer);
|
||||
void MyTimer_PWM( MyTimer_Struct_TypeDef * Timer, uint16_t cycle);
|
||||
|
||||
/*#define MyTimer_Base_Start(Timer)
|
||||
#define MyTimer_Base_Stop(Timer)
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
|
|
22
Drivers/Include/Driver_UART.h
Normale Datei
22
Drivers/Include/Driver_UART.h
Normale Datei
|
@ -0,0 +1,22 @@
|
|||
#ifndef MYUART_H
|
||||
#define MYUART_H
|
||||
|
||||
#include "stm32f10x.h"
|
||||
|
||||
typedef struct {
|
||||
USART_TypeDef * UART;
|
||||
unsigned int baudrate;
|
||||
}MyUART_Struct_Typedef;
|
||||
|
||||
void UART_send(char data);
|
||||
char UART_read(char data, MyUART_Struct_Typedef * UART);
|
||||
void UART_init(MyUART_Struct_Typedef * UART);
|
||||
void USART1_IRQHandler(void);
|
||||
void USART2_IRQHandler(void);
|
||||
void USART3_IRQHandler(void);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -36,3 +36,11 @@ void MyTimer_Base_Stop(TIM_TypeDef * Timer){
|
|||
}
|
||||
|
||||
|
||||
void MyTimer_PWM( MyTimer_Struct_TypeDef * Timer, uint16_t cycle){
|
||||
Timer->Timer->CCMR1 &= ~TIM_CCMR1_OC1M_0; //Configuration du canal CH1
|
||||
Timer->Timer->CCMR1 |= TIM_CCMR1_OC1M_1| TIM_CCMR1_OC1M_2; // Ajouter 110 aux bits OC1M (registre CCMR1)
|
||||
|
||||
Timer->Timer->CCER |= TIM_CCER_CC1E; // Canal CH1 validé par bit CC1E (registre CCER)
|
||||
Timer->Timer->CR1 |= TIM_CR1_CEN; // Lancement du timer
|
||||
Timer->Timer->CCR1 = (cycle * Timer->ARR) / 100; // Fixer la durée à 20%
|
||||
}
|
||||
|
|
93
Drivers/Sources/Driver_UART.c
Normale Datei
93
Drivers/Sources/Driver_UART.c
Normale Datei
|
@ -0,0 +1,93 @@
|
|||
#include "Driver_UART.h"
|
||||
|
||||
|
||||
char received_data1, received_data2, received_data3;
|
||||
|
||||
void UART_init(MyUART_Struct_Typedef * UART)
|
||||
{
|
||||
if(UART->UART ==USART1)
|
||||
RCC->APB2ENR |= RCC_APB2ENR_USART1EN;
|
||||
else if(UART->UART ==USART2)
|
||||
RCC->APB1ENR |= RCC_APB1ENR_USART2EN;
|
||||
else if(UART->UART ==USART3)
|
||||
RCC->APB1ENR |= RCC_APB1ENR_USART3EN;
|
||||
|
||||
|
||||
RCC->APB2ENR |= RCC_APB2ENR_USART1EN; // Validation horloge USART1
|
||||
USART1->CR1 |= USART_CR1_UE; // Activer l'USART
|
||||
USART1->CR1 &= ~USART_CR1_M; // Choisir la taille 8bits de donnée
|
||||
USART1->CR2 |= USART_CR2_STOP; // 1 seul bit de stop
|
||||
//USART1->BRR |= 468 << 4; // Fixe le baud rate à 9600bps partie entière
|
||||
//USART1->BRR |= 75; // Fixe le baud rate à 9600bps partie fractionnaire
|
||||
UART->UART->BRR = 72000000/(UART->baudrate);
|
||||
USART1->CR1 |= USART_CR1_TE; // Autoriser la transmission
|
||||
USART1->CR1 |= USART_CR1_RE; // Activer la réception
|
||||
USART1->CR1 |= USART_CR1_TCIE; // Activer l'interruption de transmission
|
||||
USART1->CR1 |= USART_CR1_RXNEIE; // Activer l'interruption de réception
|
||||
}
|
||||
|
||||
void UART_send(char data)
|
||||
{
|
||||
while(!(USART1->SR & USART_SR_TXE)){} //Attendre l'autorisation de transmission
|
||||
USART1->DR |= data;
|
||||
while(!(USART1->SR & USART_SR_TC)){} //Attendre la fin de transmission
|
||||
}
|
||||
|
||||
char UART_read(char data, MyUART_Struct_Typedef * UART)
|
||||
{
|
||||
if(UART->UART == USART1)
|
||||
return received_data1;
|
||||
else if (UART->UART == USART2)
|
||||
return received_data2;
|
||||
else if (UART->UART == USART3)
|
||||
return received_data3;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void USART1_IRQHandler(void)
|
||||
{
|
||||
if (USART1->SR & USART_SR_RXNE) // si une donnée a été reçue
|
||||
{
|
||||
received_data1 = USART1->DR; // lire la donnée reçue
|
||||
}
|
||||
|
||||
if (USART1->SR & USART_SR_TC) // si la transmission est terminée
|
||||
{
|
||||
USART1->SR &= ~USART_SR_TC; // effacer le bit de transmission terminée
|
||||
}
|
||||
}
|
||||
|
||||
void USART2_IRQHandler(void)
|
||||
{
|
||||
if (USART2->SR & USART_SR_RXNE) // si une donnée a été reçue
|
||||
{
|
||||
received_data2 = USART2->DR; // lire la donnée reçue
|
||||
}
|
||||
|
||||
if (USART2->SR & USART_SR_TC) // si la transmission est terminée
|
||||
{
|
||||
USART2->SR &= ~USART_SR_TC; // effacer le bit de transmission terminée
|
||||
}
|
||||
}
|
||||
|
||||
void USART3_IRQHandler(void)
|
||||
{
|
||||
if (USART3->SR & USART_SR_RXNE) // si une donnée a été reçue
|
||||
{
|
||||
received_data3 = USART3->DR; // lire la donnée reçue
|
||||
}
|
||||
|
||||
if (USART3->SR & USART_SR_TC) // si la transmission est terminée
|
||||
{
|
||||
USART3->SR &= ~USART_SR_TC; // effacer le bit de transmission terminée
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void UART_interruption (MyUART_Struct_Typedef * UART)
|
||||
{
|
||||
UART->UART->CR1 |= USART_CR1_RXNEIE;
|
||||
NVIC->ISER[0] |= 1<<USART1_IRQn;
|
||||
}
|
|
@ -125,7 +125,7 @@
|
|||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGDARM</Key>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=297,604,718,1031,0)(121=-1,-1,-1,-1,0)(122=546,289,967,716,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=997,343,1591,1094,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=297,604,718,1031,0)(121=-1,-1,-1,-1,0)(122=546,289,967,716,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=846,135,1440,886,0)(131=846,343,1440,1094,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-923,465,-475,879,0)(161=992,268,1440,682,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
|
@ -143,14 +143,223 @@
|
|||
<Name>-U -O206 -S8 -C0 -P00 -N00("") -D00(00000000) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>351</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>54</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>C:\Users\cedri\OneDrive\INSA\S6\Microcontrôleur\Projet\Voilier\GPIO_Test\RTE\Device\STM32F103RB\system_stm32f10x.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\GPIO_Test\RTE/Device/STM32F103RB/system_stm32f10x.c\351</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>1</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>0</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>18</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename></Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>0x00000012</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>2</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>69</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>134218622</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>C:\Users\cedri\OneDrive\INSA\S6\Microcontrôleur\Projet\Voilier\Drivers\Sources\Driver_UART.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\GPIO_Test\../Drivers/Sources/Driver_UART.c\69</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>3</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>56</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>134218578</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>C:\Users\cedri\OneDrive\INSA\S6\Microcontrôleur\Projet\Voilier\Drivers\Sources\Driver_UART.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\GPIO_Test\../Drivers/Sources/Driver_UART.c\56</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>4</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>0</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>20</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename></Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>0x00000014</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>5</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>338</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>40</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>C:\Users\cedri\OneDrive\INSA\S6\Microcontrôleur\Projet\Voilier\GPIO_Test\RTE\Device\STM32F103RB\system_stm32f10x.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\GPIO_Test\RTE/Device/STM32F103RB/system_stm32f10x.c\338</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>6</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>22</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>114</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>C:\Users\cedri\OneDrive\INSA\S6\Microcontrôleur\Projet\Voilier\Drivers\Sources\Driver_UART.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\GPIO_Test\../Drivers/Sources/Driver_UART.c\22</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>7</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>134</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>134218094</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>RTE/Device/STM32F103RB/startup_stm32f10x_md.s</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\GPIO_Test\RTE/Device/STM32F103RB/startup_stm32f10x_md.s\134</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>8</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>33</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>..\Drivers\Sources\Driver_UART.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>9</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>39</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>..\Drivers\Sources\Driver_UART.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>10</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>85</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>..\Drivers\Sources\Driver_UART.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>11</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>92</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>..\Drivers\Sources\Driver_UART.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>12</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>59</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>.\Sources\Main.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
<DebugFlag>
|
||||
<trace>0</trace>
|
||||
<periodic>1</periodic>
|
||||
<aLwin>1</aLwin>
|
||||
<aLwin>0</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
|
@ -158,13 +367,13 @@
|
|||
<viewmode>1</viewmode>
|
||||
<vrSel>0</vrSel>
|
||||
<aSym>0</aSym>
|
||||
<aTbox>1</aTbox>
|
||||
<aTbox>0</aTbox>
|
||||
<AscS1>0</AscS1>
|
||||
<AscS2>0</AscS2>
|
||||
<AscS3>0</AscS3>
|
||||
<aSer3>0</aSer3>
|
||||
<eProf>0</eProf>
|
||||
<aLa>1</aLa>
|
||||
<aLa>0</aLa>
|
||||
<aPa1>0</aPa1>
|
||||
<AscS4>0</AscS4>
|
||||
<aSer4>0</aSer4>
|
||||
|
@ -193,12 +402,6 @@
|
|||
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028504F5254412026203078303030303030323029203E3E2035000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F1700000000000000000000000000000000000000DA040008</SecondString>
|
||||
</Wi>
|
||||
</LogicAnalyzers>
|
||||
<SystemViewers>
|
||||
<Entry>
|
||||
<Name>System Viewer\GPIOA</Name>
|
||||
<WinId>35905</WinId>
|
||||
</Entry>
|
||||
</SystemViewers>
|
||||
<DebugDescription>
|
||||
<Enable>1</Enable>
|
||||
<EnableFlashSeq>0</EnableFlashSeq>
|
||||
|
@ -422,48 +625,12 @@
|
|||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>3</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Drivers\Include\Driver_GPIO.h</PathWithFileName>
|
||||
<FilenameWithoutPath>Driver_GPIO.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>4</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Drivers\Include\Driver_Timer.h</PathWithFileName>
|
||||
<FilenameWithoutPath>Driver_Timer.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>5</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Drivers\Include\Driver_ADC.h</PathWithFileName>
|
||||
<FilenameWithoutPath>Driver_ADC.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>6</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Drivers\Sources\Driver_ADC.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Driver_ADC.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\Drivers\Sources\Driver_UART.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Driver_UART.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -477,7 +644,7 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>7</FileNumber>
|
||||
<FileNumber>4</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
<TargetName>Simu</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
|
||||
<uAC6>1</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>STM32F103RB</Device>
|
||||
<Vendor>STMicroelectronics</Vendor>
|
||||
<PackID>Keil.STM32F1xx_DFP.2.3.0</PackID>
|
||||
<PackID>Keil.STM32F1xx_DFP.2.4.0</PackID>
|
||||
<PackURL>http://www.keil.com/pack/</PackURL>
|
||||
<Cpu>IRAM(0x20000000,0x00005000) IROM(0x08000000,0x00020000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
|
@ -186,6 +186,7 @@
|
|||
<RvdsVP>0</RvdsVP>
|
||||
<RvdsMve>0</RvdsMve>
|
||||
<RvdsCdeCp>0</RvdsCdeCp>
|
||||
<nBranchProt>0</nBranchProt>
|
||||
<hadIRAM2>0</hadIRAM2>
|
||||
<hadIROM2>0</hadIROM2>
|
||||
<StupSel>8</StupSel>
|
||||
|
@ -313,7 +314,7 @@
|
|||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>1</Optim>
|
||||
<Optim>2</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
|
@ -322,14 +323,14 @@
|
|||
<PlainCh>0</PlainCh>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<wLevel>2</wLevel>
|
||||
<wLevel>3</wLevel>
|
||||
<uThumb>0</uThumb>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>5</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
|
@ -394,24 +395,9 @@
|
|||
<FilePath>..\Drivers\Sources\Driver_Timer.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_GPIO.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Drivers\Include\Driver_GPIO.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_Timer.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Drivers\Include\Driver_Timer.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_ADC.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Drivers\Include\Driver_ADC.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_ADC.c</FileName>
|
||||
<FileName>Driver_UART.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Drivers\Sources\Driver_ADC.c</FilePath>
|
||||
<FilePath>..\Drivers\Sources\Driver_UART.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
|
@ -443,7 +429,7 @@
|
|||
<TargetCommonOption>
|
||||
<Device>STM32F103RB</Device>
|
||||
<Vendor>STMicroelectronics</Vendor>
|
||||
<PackID>Keil.STM32F1xx_DFP.2.3.0</PackID>
|
||||
<PackID>Keil.STM32F1xx_DFP.2.4.0</PackID>
|
||||
<PackURL>http://www.keil.com/pack/</PackURL>
|
||||
<Cpu>IRAM(0x20000000,0x00005000) IROM(0x08000000,0x00020000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
|
@ -613,6 +599,7 @@
|
|||
<RvdsVP>0</RvdsVP>
|
||||
<RvdsMve>0</RvdsMve>
|
||||
<RvdsCdeCp>0</RvdsCdeCp>
|
||||
<nBranchProt>0</nBranchProt>
|
||||
<hadIRAM2>0</hadIRAM2>
|
||||
<hadIROM2>0</hadIROM2>
|
||||
<StupSel>8</StupSel>
|
||||
|
@ -821,24 +808,9 @@
|
|||
<FilePath>..\Drivers\Sources\Driver_Timer.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_GPIO.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Drivers\Include\Driver_GPIO.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_Timer.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Drivers\Include\Driver_Timer.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_ADC.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Drivers\Include\Driver_ADC.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_ADC.c</FileName>
|
||||
<FileName>Driver_UART.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Drivers\Sources\Driver_ADC.c</FilePath>
|
||||
<FilePath>..\Drivers\Sources\Driver_UART.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
|
@ -865,15 +837,15 @@
|
|||
<RTE>
|
||||
<apis/>
|
||||
<components>
|
||||
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.4.0" condition="ARMv6_7_8-M Device">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
|
||||
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.6.0" condition="ARMv6_7_8-M Device">
|
||||
<package name="CMSIS" schemaVersion="1.7.7" url="http://www.keil.com/pack/" vendor="ARM" version="5.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="Simu"/>
|
||||
<targetInfo name="cible"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F1xx CMSIS">
|
||||
<package name="STM32F1xx_DFP" schemaVersion="1.4.0" url="http://www.keil.com/pack/" vendor="Keil" version="2.3.0"/>
|
||||
<package name="STM32F1xx_DFP" schemaVersion="1.7.2" url="http://www.keil.com/pack/" vendor="Keil" version="2.4.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="Simu"/>
|
||||
<targetInfo name="cible"/>
|
||||
|
@ -884,7 +856,7 @@
|
|||
<file attr="config" category="header" name="RTE_Driver\Config\RTE_Device.h" version="1.1.2">
|
||||
<instance index="0">RTE\Device\STM32F103RB\RTE_Device.h</instance>
|
||||
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F1xx CMSIS"/>
|
||||
<package name="STM32F1xx_DFP" schemaVersion="1.4.0" url="http://www.keil.com/pack/" vendor="Keil" version="2.3.0"/>
|
||||
<package name="STM32F1xx_DFP" schemaVersion="1.7.2" url="http://www.keil.com/pack/" vendor="Keil" version="2.4.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="Simu"/>
|
||||
<targetInfo name="cible"/>
|
||||
|
@ -893,7 +865,7 @@
|
|||
<file attr="config" category="source" condition="STM32F1xx MD ARMCC" name="Device\Source\ARM\startup_stm32f10x_md.s" version="1.0.0">
|
||||
<instance index="0">RTE\Device\STM32F103RB\startup_stm32f10x_md.s</instance>
|
||||
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F1xx CMSIS"/>
|
||||
<package name="STM32F1xx_DFP" schemaVersion="1.4.0" url="http://www.keil.com/pack/" vendor="Keil" version="2.3.0"/>
|
||||
<package name="STM32F1xx_DFP" schemaVersion="1.7.2" url="http://www.keil.com/pack/" vendor="Keil" version="2.4.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="Simu"/>
|
||||
<targetInfo name="cible"/>
|
||||
|
@ -902,7 +874,7 @@
|
|||
<file attr="config" category="source" name="Device\Source\system_stm32f10x.c" version="1.0.0">
|
||||
<instance index="0">RTE\Device\STM32F103RB\system_stm32f10x.c</instance>
|
||||
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F1xx CMSIS"/>
|
||||
<package name="STM32F1xx_DFP" schemaVersion="1.4.0" url="http://www.keil.com/pack/" vendor="Keil" version="2.3.0"/>
|
||||
<package name="STM32F1xx_DFP" schemaVersion="1.7.2" url="http://www.keil.com/pack/" vendor="Keil" version="2.4.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="Simu"/>
|
||||
<targetInfo name="cible"/>
|
||||
|
|
1828
GPIO_Test/RTE/Device/STM32F103RB/RTE_Device.h.base@1.1.2
Normale Datei
1828
GPIO_Test/RTE/Device/STM32F103RB/RTE_Device.h.base@1.1.2
Normale Datei
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
308
GPIO_Test/RTE/Device/STM32F103RB/startup_stm32f10x_md.s.update@1.0.1
Normale Datei
308
GPIO_Test/RTE/Device/STM32F103RB/startup_stm32f10x_md.s.update@1.0.1
Normale Datei
|
@ -0,0 +1,308 @@
|
|||
;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
|
||||
;* File Name : startup_stm32f10x_md.s
|
||||
;* Author : MCD Application Team
|
||||
;* Version : V3.5.1
|
||||
;* Date : 08-September-2021
|
||||
;* Description : STM32F10x Medium Density Devices vector table for MDK-ARM
|
||||
;* toolchain.
|
||||
;* This module performs:
|
||||
;* - Set the initial SP
|
||||
;* - Set the initial PC == Reset_Handler
|
||||
;* - Set the vector table entries with the exceptions ISR address
|
||||
;* - Configure the clock system
|
||||
;* - Branches to __main in the C library (which eventually
|
||||
;* calls main()).
|
||||
;* After Reset the CortexM3 processor is in Thread mode,
|
||||
;* priority is Privileged, and the Stack is set to Main.
|
||||
;* <<< Use Configuration Wizard in Context Menu >>>
|
||||
;*******************************************************************************
|
||||
;*
|
||||
;* Copyright (c) 2011 STMicroelectronics.
|
||||
;* All rights reserved.
|
||||
;*
|
||||
;* This software is licensed under terms that can be found in the LICENSE file
|
||||
;* in the root directory of this software component.
|
||||
;* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
;
|
||||
;*******************************************************************************
|
||||
|
||||
; Amount of memory (in bytes) allocated for Stack
|
||||
; Tailor this value to your application needs
|
||||
; <h> Stack Configuration
|
||||
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
|
||||
Stack_Size EQU 0x00000400
|
||||
|
||||
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||
Stack_Mem SPACE Stack_Size
|
||||
__initial_sp
|
||||
|
||||
|
||||
; <h> Heap Configuration
|
||||
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
|
||||
Heap_Size EQU 0x00000200
|
||||
|
||||
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||
__heap_base
|
||||
Heap_Mem SPACE Heap_Size
|
||||
__heap_limit
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
|
||||
|
||||
; Vector Table Mapped to Address 0 at Reset
|
||||
AREA RESET, DATA, READONLY
|
||||
EXPORT __Vectors
|
||||
EXPORT __Vectors_End
|
||||
EXPORT __Vectors_Size
|
||||
|
||||
__Vectors DCD __initial_sp ; Top of Stack
|
||||
DCD Reset_Handler ; Reset Handler
|
||||
DCD NMI_Handler ; NMI Handler
|
||||
DCD HardFault_Handler ; Hard Fault Handler
|
||||
DCD MemManage_Handler ; MPU Fault Handler
|
||||
DCD BusFault_Handler ; Bus Fault Handler
|
||||
DCD UsageFault_Handler ; Usage Fault Handler
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD SVC_Handler ; SVCall Handler
|
||||
DCD DebugMon_Handler ; Debug Monitor Handler
|
||||
DCD 0 ; Reserved
|
||||
DCD PendSV_Handler ; PendSV Handler
|
||||
DCD SysTick_Handler ; SysTick Handler
|
||||
|
||||
; External Interrupts
|
||||
DCD WWDG_IRQHandler ; Window Watchdog
|
||||
DCD PVD_IRQHandler ; PVD through EXTI Line detect
|
||||
DCD TAMPER_IRQHandler ; Tamper
|
||||
DCD RTC_IRQHandler ; RTC
|
||||
DCD FLASH_IRQHandler ; Flash
|
||||
DCD RCC_IRQHandler ; RCC
|
||||
DCD EXTI0_IRQHandler ; EXTI Line 0
|
||||
DCD EXTI1_IRQHandler ; EXTI Line 1
|
||||
DCD EXTI2_IRQHandler ; EXTI Line 2
|
||||
DCD EXTI3_IRQHandler ; EXTI Line 3
|
||||
DCD EXTI4_IRQHandler ; EXTI Line 4
|
||||
DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
|
||||
DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
|
||||
DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
|
||||
DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
|
||||
DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
|
||||
DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
|
||||
DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
|
||||
DCD ADC1_2_IRQHandler ; ADC1_2
|
||||
DCD USB_HP_CAN1_TX_IRQHandler ; USB High Priority or CAN1 TX
|
||||
DCD USB_LP_CAN1_RX0_IRQHandler ; USB Low Priority or CAN1 RX0
|
||||
DCD CAN1_RX1_IRQHandler ; CAN1 RX1
|
||||
DCD CAN1_SCE_IRQHandler ; CAN1 SCE
|
||||
DCD EXTI9_5_IRQHandler ; EXTI Line 9..5
|
||||
DCD TIM1_BRK_IRQHandler ; TIM1 Break
|
||||
DCD TIM1_UP_IRQHandler ; TIM1 Update
|
||||
DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation
|
||||
DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
|
||||
DCD TIM2_IRQHandler ; TIM2
|
||||
DCD TIM3_IRQHandler ; TIM3
|
||||
DCD TIM4_IRQHandler ; TIM4
|
||||
DCD I2C1_EV_IRQHandler ; I2C1 Event
|
||||
DCD I2C1_ER_IRQHandler ; I2C1 Error
|
||||
DCD I2C2_EV_IRQHandler ; I2C2 Event
|
||||
DCD I2C2_ER_IRQHandler ; I2C2 Error
|
||||
DCD SPI1_IRQHandler ; SPI1
|
||||
DCD SPI2_IRQHandler ; SPI2
|
||||
DCD USART1_IRQHandler ; USART1
|
||||
DCD USART2_IRQHandler ; USART2
|
||||
DCD USART3_IRQHandler ; USART3
|
||||
DCD EXTI15_10_IRQHandler ; EXTI Line 15..10
|
||||
DCD RTCAlarm_IRQHandler ; RTC Alarm through EXTI Line
|
||||
DCD USBWakeUp_IRQHandler ; USB Wakeup from suspend
|
||||
__Vectors_End
|
||||
|
||||
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
; Reset handler
|
||||
Reset_Handler PROC
|
||||
EXPORT Reset_Handler [WEAK]
|
||||
IMPORT __main
|
||||
IMPORT SystemInit
|
||||
LDR R0, =SystemInit
|
||||
BLX R0
|
||||
LDR R0, =__main
|
||||
BX R0
|
||||
ENDP
|
||||
|
||||
; Dummy Exception Handlers (infinite loops which can be modified)
|
||||
|
||||
NMI_Handler PROC
|
||||
EXPORT NMI_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
HardFault_Handler\
|
||||
PROC
|
||||
EXPORT HardFault_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
MemManage_Handler\
|
||||
PROC
|
||||
EXPORT MemManage_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
BusFault_Handler\
|
||||
PROC
|
||||
EXPORT BusFault_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
UsageFault_Handler\
|
||||
PROC
|
||||
EXPORT UsageFault_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
SVC_Handler PROC
|
||||
EXPORT SVC_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
DebugMon_Handler\
|
||||
PROC
|
||||
EXPORT DebugMon_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
PendSV_Handler PROC
|
||||
EXPORT PendSV_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
SysTick_Handler PROC
|
||||
EXPORT SysTick_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
|
||||
Default_Handler PROC
|
||||
|
||||
EXPORT WWDG_IRQHandler [WEAK]
|
||||
EXPORT PVD_IRQHandler [WEAK]
|
||||
EXPORT TAMPER_IRQHandler [WEAK]
|
||||
EXPORT RTC_IRQHandler [WEAK]
|
||||
EXPORT FLASH_IRQHandler [WEAK]
|
||||
EXPORT RCC_IRQHandler [WEAK]
|
||||
EXPORT EXTI0_IRQHandler [WEAK]
|
||||
EXPORT EXTI1_IRQHandler [WEAK]
|
||||
EXPORT EXTI2_IRQHandler [WEAK]
|
||||
EXPORT EXTI3_IRQHandler [WEAK]
|
||||
EXPORT EXTI4_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel1_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel2_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel3_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel4_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel5_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel6_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel7_IRQHandler [WEAK]
|
||||
EXPORT ADC1_2_IRQHandler [WEAK]
|
||||
EXPORT USB_HP_CAN1_TX_IRQHandler [WEAK]
|
||||
EXPORT USB_LP_CAN1_RX0_IRQHandler [WEAK]
|
||||
EXPORT CAN1_RX1_IRQHandler [WEAK]
|
||||
EXPORT CAN1_SCE_IRQHandler [WEAK]
|
||||
EXPORT EXTI9_5_IRQHandler [WEAK]
|
||||
EXPORT TIM1_BRK_IRQHandler [WEAK]
|
||||
EXPORT TIM1_UP_IRQHandler [WEAK]
|
||||
EXPORT TIM1_TRG_COM_IRQHandler [WEAK]
|
||||
EXPORT TIM1_CC_IRQHandler [WEAK]
|
||||
EXPORT TIM2_IRQHandler [WEAK]
|
||||
EXPORT TIM3_IRQHandler [WEAK]
|
||||
EXPORT TIM4_IRQHandler [WEAK]
|
||||
EXPORT I2C1_EV_IRQHandler [WEAK]
|
||||
EXPORT I2C1_ER_IRQHandler [WEAK]
|
||||
EXPORT I2C2_EV_IRQHandler [WEAK]
|
||||
EXPORT I2C2_ER_IRQHandler [WEAK]
|
||||
EXPORT SPI1_IRQHandler [WEAK]
|
||||
EXPORT SPI2_IRQHandler [WEAK]
|
||||
EXPORT USART1_IRQHandler [WEAK]
|
||||
EXPORT USART2_IRQHandler [WEAK]
|
||||
EXPORT USART3_IRQHandler [WEAK]
|
||||
EXPORT EXTI15_10_IRQHandler [WEAK]
|
||||
EXPORT RTCAlarm_IRQHandler [WEAK]
|
||||
EXPORT USBWakeUp_IRQHandler [WEAK]
|
||||
|
||||
WWDG_IRQHandler
|
||||
PVD_IRQHandler
|
||||
TAMPER_IRQHandler
|
||||
RTC_IRQHandler
|
||||
FLASH_IRQHandler
|
||||
RCC_IRQHandler
|
||||
EXTI0_IRQHandler
|
||||
EXTI1_IRQHandler
|
||||
EXTI2_IRQHandler
|
||||
EXTI3_IRQHandler
|
||||
EXTI4_IRQHandler
|
||||
DMA1_Channel1_IRQHandler
|
||||
DMA1_Channel2_IRQHandler
|
||||
DMA1_Channel3_IRQHandler
|
||||
DMA1_Channel4_IRQHandler
|
||||
DMA1_Channel5_IRQHandler
|
||||
DMA1_Channel6_IRQHandler
|
||||
DMA1_Channel7_IRQHandler
|
||||
ADC1_2_IRQHandler
|
||||
USB_HP_CAN1_TX_IRQHandler
|
||||
USB_LP_CAN1_RX0_IRQHandler
|
||||
CAN1_RX1_IRQHandler
|
||||
CAN1_SCE_IRQHandler
|
||||
EXTI9_5_IRQHandler
|
||||
TIM1_BRK_IRQHandler
|
||||
TIM1_UP_IRQHandler
|
||||
TIM1_TRG_COM_IRQHandler
|
||||
TIM1_CC_IRQHandler
|
||||
TIM2_IRQHandler
|
||||
TIM3_IRQHandler
|
||||
TIM4_IRQHandler
|
||||
I2C1_EV_IRQHandler
|
||||
I2C1_ER_IRQHandler
|
||||
I2C2_EV_IRQHandler
|
||||
I2C2_ER_IRQHandler
|
||||
SPI1_IRQHandler
|
||||
SPI2_IRQHandler
|
||||
USART1_IRQHandler
|
||||
USART2_IRQHandler
|
||||
USART3_IRQHandler
|
||||
EXTI15_10_IRQHandler
|
||||
RTCAlarm_IRQHandler
|
||||
USBWakeUp_IRQHandler
|
||||
|
||||
B .
|
||||
|
||||
ENDP
|
||||
|
||||
ALIGN
|
||||
|
||||
;*******************************************************************************
|
||||
; User Stack and Heap initialization
|
||||
;*******************************************************************************
|
||||
IF :DEF:__MICROLIB
|
||||
|
||||
EXPORT __initial_sp
|
||||
EXPORT __heap_base
|
||||
EXPORT __heap_limit
|
||||
|
||||
ELSE
|
||||
|
||||
IMPORT __use_two_region_memory
|
||||
EXPORT __user_initial_stackheap
|
||||
|
||||
__user_initial_stackheap
|
||||
|
||||
LDR R0, = Heap_Mem
|
||||
LDR R1, =(Stack_Mem + Stack_Size)
|
||||
LDR R2, = (Heap_Mem + Heap_Size)
|
||||
LDR R3, = Stack_Mem
|
||||
BX LR
|
||||
|
||||
ALIGN
|
||||
|
||||
ENDIF
|
||||
|
||||
END
|
||||
|
1092
GPIO_Test/RTE/Device/STM32F103RB/system_stm32f10x.c.update@1.0.1
Normale Datei
1092
GPIO_Test/RTE/Device/STM32F103RB/system_stm32f10x.c.update@1.0.1
Normale Datei
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
|
@ -1,29 +1,83 @@
|
|||
#include "Driver_GPIO.h"
|
||||
#include "Driver_Timer.h"
|
||||
#include "Driver_UART.h"
|
||||
|
||||
char data[] = "Hello World";
|
||||
int i = 0;
|
||||
int len = sizeof(data) - 1; // -1 pour ne pas envoyer le caractère nul
|
||||
|
||||
int main (void){
|
||||
//Déclaration d'une LED et d'un BP par structure GPIO
|
||||
MyGPIO_Struct_TypeDef LED;
|
||||
MyGPIO_Struct_TypeDef BP;
|
||||
|
||||
//Déclaration d'un Timer 500 ms
|
||||
MyTimer_Struct_TypeDef TIM500ms;
|
||||
|
||||
//Déclaration de l'UART
|
||||
MyUART_Struct_Typedef * UART;
|
||||
UART->UART=USART1;
|
||||
UART->baudrate=9600;
|
||||
|
||||
//Config LED PA5
|
||||
LED.GPIO_Conf = Out_Ppull;
|
||||
LED.GPIO_Pin = 5;
|
||||
LED.GPIO = GPIOA;
|
||||
MyGPIO_Init (&LED) ;
|
||||
//Config BP PC13
|
||||
BP.GPIO_Conf = In_Floating;
|
||||
BP.GPIO_Pin = 13;
|
||||
BP.GPIO = GPIOC;
|
||||
//Init BP & LED
|
||||
MyGPIO_Init (&LED);
|
||||
MyGPIO_Init (&BP);
|
||||
//Init Timer 2 et Test
|
||||
TIM500ms.Timer = TIM2;
|
||||
TIM500ms.PSC = 0xD2F0; // =0.5ms(calculé à partir de la fréquence du micro)
|
||||
TIM500ms.ARR = 1000;
|
||||
TIM500ms.PSC = 7200; // =0.5ms(calculé à partir de la fréquence du micro)
|
||||
TIM500ms.ARR = 5000;
|
||||
MyTimer_Base_Init(&TIM500ms);
|
||||
|
||||
|
||||
/*
|
||||
TIM2->DIER |= 1<< 0 ; //INTERRUPTION PERIPH
|
||||
//TIM2->DIER |= TIM_DIER_UIE ;
|
||||
NVIC->ISER[0] |= 1<<TIM2_IRQn ; //INTERRUPTION COEUR
|
||||
NVIC->IP[TIM2_IRQn] = 2<< 4 ;
|
||||
|
||||
*/
|
||||
MyTimer_Base_Start(TIM500ms.Timer);
|
||||
//Boucle infinie de la réponse de la LED à l'état BP
|
||||
|
||||
MyTimer_PWM(&TIM500ms, 50);
|
||||
|
||||
|
||||
|
||||
UART_init(UART);
|
||||
|
||||
//NVIC_EnableIRQ(USART1_IRQn);// Activer les interruptions
|
||||
|
||||
// Envoyer les données
|
||||
for (i = 0; i < len; i++) {
|
||||
UART_send(data[i]);
|
||||
}
|
||||
|
||||
UART_read(data[i], UART);
|
||||
|
||||
|
||||
|
||||
|
||||
while(1){
|
||||
// if (MyGPIO_Read(BP.GPIO,BP.GPIO_Pin)==0){
|
||||
// MyGPIO_Set(LED.GPIO,LED.GPIO_Pin);
|
||||
// }else{
|
||||
// MyGPIO_Reset(LED.GPIO,LED.GPIO_Pin);
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void TIM2_IRQHandler (void)
|
||||
{
|
||||
MyGPIO_Toggle(GPIOA,5);
|
||||
TIM2->SR &= ~(1<<0);
|
||||
}
|
||||
*/
|
Laden …
In neuem Issue referenzieren