Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TY
TianYing_ty100
Commits
6beb5c28
Commit
6beb5c28
authored
Oct 16, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:QAC问题:45353 Definite: Dereference of an invalid pointer value.
parent
b12dc266
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tim.c
...ource/Device/Cmsemicon/BAT32A239/Library/Driver/src/tim.c
+3
-3
No files found.
Firmware/Source/Device/Cmsemicon/BAT32A239/Library/Driver/src/tim.c
View file @
6beb5c28
...
...
@@ -190,7 +190,7 @@ void TIM_Cmd(TIMSelect_TypeDef TIMx,uint8_t Chx,TIM_FunState NewState)
* @brief Set the specified TIMER channel's count num.
* @param TIMx: where x can be 0, 1, select TIEMR peripheral.
* @param Chx: where x can be 0, 1,2,3 select channel of specified TIMER peripheral.
* @arg TTM_Channel_0
、TTM_Channel_1、TTM_Channel_2、
TTM_Channel_3
* @arg TTM_Channel_0
��TTM_Channel_1��TTM_Channel_2��TTM
_Channel_3
* @param counter: the count num of the TIEMR channel.
* @retval None
*/
...
...
@@ -294,11 +294,11 @@ int TIM_Init(TIM_InitTypeDef *TIM_InitStruct)
*
TIM_reg
.
TDR
[
currentMChan
[
j
]]
=
TIM_InitStruct
->
TIM_Period
[
currentMChan
[
j
]]
-
1
;
*
TIM_reg
.
TO
&=
~
(
1
<<
masterPos
);
*
TIM_reg
.
TOE
&=
~
(
1
<<
masterPos
);
MISC
->
NFEN1
|=
(
1
<<
currentMChan
[
j
]);
//
后加
MISC
->
NFEN1
|=
(
1
<<
currentMChan
[
j
]);
//
���
j
++
;
}
}
for
(
chanPos
=
0
;
chanPos
<
8
;
chanPos
++
)
//从属通道配置
for
(
chanPos
=
0
;
chanPos
<
TIMER_CHAN_MAX_NUM
;
chanPos
++
)
//����ͨ������
{
pos
=
((
uint8_t
)
0x01
)
<<
chanPos
;
chanNum
=
TIM_InitStruct
->
TIM_Channel
&
pos
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment