When learning with the STM32 video, in the simulation link,
"Unknown Signal."
the dialog box popped up by your own software. I found clues when I carefully set up the simulation link with the teacher's video comparison, so I will record and share the solution.
This article is only published on CSDN Qingyun Shuangqing and my personal blog, and it appears elsewhere
Problem recurrence
Compile the code, click the Debug button, and then click , a dialog box will pop up after Logic Analyzer
clicking the button , and then load according to the GPIO port and pin you set, but at this time, the pop-up window appears!Setup
Setup Logic Analyzer
Solution
Then you can follow my settings step by step to ensure that you can use the simulation normally!
Settings before simulation
- First compile the code, first ensure that the code does not go wrong
- Next, click the magic wand and go to
Debug
the tab to set - Of course, if you want to simulate, click
Use Simulator
the select button
Then, your interface may look like this
This is the interface that has not been set, and the important settings are the things in the box.
第一个空需要修改为
DARMSTM.DLL
第二个空需要修改为
Here I will take the chip I use STM32F103C8T6
as an example to illustrate
-pSTM32F103C8
After setting is complete, as shown in the figure
Click OK, then compile again, and then start Debug
the simulation
Let me take the level change simulation of the PC13 pin set by myself as an example to illustrate the simulation situation
My relevant GPIO initialization code
void LedGpioInit(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_13;
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOC, &GPIO_InitStruct);
}
My relevant code that does the blinking
void LedControl(void)
{
GPIO_SetBits(GPIOC,GPIO_Pin_13);
SysTickDelayMs(1000);
GPIO_ResetBits(GPIOC, GPIO_Pin_13);
SysTickDelayMs(1000);
}
Finally placed in the infinite loop of the main function
int main(void)
{
while(1)
{
LedControl();
}
}
The effect of simulation
The final effect is not bad, almost completely close to 1s level inversion once
Attention
- The setting method for a certain pin of a certain port is as follows, taking PC13 as an example here
PORTC.13 然后回车即可
Display Type
Remember to set the following toBit
- You can open the waveform diagram of multiple pins, and you can also set different waveform colors
- You can click
ZOOM
insideIN
-OUT
-toALL
zoom the waveform output for easy viewing
This article is edited using MarkDown syntax. If you have any questions, you can private message or leave a comment below!