cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 and RBIT instruction

NCTUser
Associate III

Hello,

I use a STM32F103 MCU and I use the RBIT instruction (as an CMSIS inline functinon). The instruction works properly and I can see the rbit instruction in the disassembly window (for this project I have to use an old TrueSTUDIO IDE).

According to the ARM documentation this MCU could not execute the RBIT instruction because it is a Cortex-M3 r1p1 core (CPUID: 0x411fc231) which does not have this instruction. In spite of this the instruction seemly works and the "PM0056 Programming manual" (STM32F10xxx/20xxx/21xxx/L1xxxx) mentions too the instruction without making any difference about the revisions.

Can someone help clear up this confusion?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

Most "STM32F103" chips are counterfeit. Is this one of them?

Can you link to documentation saying RBIT is not supported? I could not find it.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Super User

Most "STM32F103" chips are counterfeit. Is this one of them?

Can you link to documentation saying RBIT is not supported? I could not find it.

If you feel a post has answered your question, please click "Accept as Solution".
NCTUser
Associate III

> Can you link to documentation saying RBIT is not supported? I could not find it.

Yes, I misguided myself about the documentation, after checking it again, the RBIT is indeed part of the Cortex-M3 instruction set, independetly form the chip revision. The STM32F103 is surely genuine because it comes from a big and reliable distributor. 

Thank you!