How can I set the Keil uVision 5 Logic Analyzer so that I can read the status of a specific pin, example high or low?

I have read the official docs here, however it does not say anything of the sort. I know it can be done as I had seen a demonstration which ustilised this useful function, but can't remember how.

Let us say I want to monitor pin 10 on port 0. I have tried many variations such as:

PINSEL0<<10 0<<10 P0.10 , however I keep getting the same error message below. Any help on how this can be done?

enter image description here

  • \$\begingroup\$ It should just be PINSEL0, and then you use the And Mask and Shift Right fields to get what you want. I'm not posting this as an answer because I don't have Keil to verify. \$\endgroup\$
    – Ron Beyer
    Jan 4, 2018 at 15:13
  • \$\begingroup\$ Thanks for you input on this matter. Luckily just found out how, will post below. \$\endgroup\$
    – rrz0
    Jan 4, 2018 at 15:13

2 Answers 2


The following worked for me:

(port0 & 0x00000400) >> 10

This specifies an AND mask for the signal value on port 0, while shifting by 10.

Important to set the Logic Analyzer functionality as bit and not analogue.

Even easier is:



Try with:


this one works for me.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.