UART Soon finish

This commit is contained in:
Cedric Chanfreau 2023-03-31 12:19:05 +02:00
parent 6d6f9a112f
commit afcef9950d
3 changed files with 96 additions and 4 deletions

View file

@ -26,4 +26,13 @@ void MyTimer_Start(MyTimer_Struct_TypeDef *Timer)
void MyTimer_Stop(MyTimer_Struct_TypeDef *Timer)
{
Timer->Timer->CR1 &= ~TIM_CR1_CEN; // Arrête le Timer
}
void MyTimer_EnableInterrupt(MyTimer_Struct_TypeDef *Timer) {
Timer->Timer->DIER |= TIM_DIER_UIE; // Active l'interruption "Update" du Timer
NVIC->ISER[Timer->IRQn / 32] = (1 << Timer->IRQn); // Pour que ce soit générique : On divise IRQn par 32 pour avoir le ISER[] correspondant. On fait également le modulo 32 de IRQn pour avoir un nombre entre 0 et 31 correspondant au setting
}
void MyTimer_PWM( MyTimer_Struct_TypeDef * Timer , char Channel){
}

View file

@ -16,6 +16,8 @@ void MyTimer_Base_Init(MyTimer_Struct_TypeDef * Timer);
void timer_init(MyTimer_Struct_TypeDef * Timer);
void MyTimer_Start(MyTimer_Struct_TypeDef *Timer);
void MyTimer_Stop(MyTimer_Struct_TypeDef *Timer);
void MyTimer_EnableInterrupt(MyTimer_Struct_TypeDef *Timer);
void MyTimer_PWM( MyTimer_Struct_TypeDef * Timer , char Channel);

View file

@ -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=942,144,1363,571,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,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=-1,-1,-1,-1,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=942,144,1363,571,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,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=1148,152,1742,903,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>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -138,7 +138,88 @@
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>57</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\Src\Principal.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>44</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\Src\Principal.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>74</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218650</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>U:\INSA\Microcontrôleur\Projet_Voilier\Projet_Voilier\ProjetsKEIL\Projet_1\Src\Principal.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TP1_Simu\Src/Principal.c\74</Expression>
</Bp>
<Bp>
<Number>3</Number>
<Type>0</Type>
<LineNumber>44</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218794</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>U:\INSA\Microcontrôleur\Projet_Voilier\Projet_Voilier\ProjetsKEIL\Projet_1\Src\Principal.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TP1_Simu\Src/Principal.c\44</Expression>
</Bp>
<Bp>
<Number>4</Number>
<Type>0</Type>
<LineNumber>57</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218828</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>U:\INSA\Microcontrôleur\Projet_Voilier\Projet_Voilier\ProjetsKEIL\Projet_1\Src\Principal.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\TP1_Simu\Src/Principal.c\57</Expression>
</Bp>
</Breakpoint>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
@ -159,7 +240,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>1</aLa>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
@ -406,7 +487,7 @@
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Drivers\Driver_GPIO.c</PathWithFileName>