The solution to Unknown Signal. appears in keil5 during waveform simulation

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 Analyzerclicking the button , and then load according to the GPIO port and pin you set, but at this time, the pop-up window appears!SetupSetup Logic Analyzer

insert image description here

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 Debugthe tab to set
  • Of course, if you want to simulate, click Use Simulatorthe select button

Then, your interface may look like this

default settings
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 STM32F103C8T6as an example to illustrate

-pSTM32F103C8

After setting is complete, as shown in the figure

insert image description here
Click OK, then compile again, and then start Debugthe 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

Effect
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 TypeRemember 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 ZOOMinside IN- OUT-to ALLzoom 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!

Guess you like

Origin blog.csdn.net/sinat_41690014/article/details/106138242