Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

MOTIX™ MCU Forum Discussions

FranCruzarianic
Level 1
Level 1
10 sign-ins 5 questions asked 5 sign-ins

For the TLE985x Infineon uses bitfields to map the registers in their library. Since I'm am kind of new to embedded programming, I read about bitfields. Many of the articles mentiond bad effects of bitfield. Now the question is, when bitfields are somehow bad, why is Infineon using it in their library?

Thank you for your help

0 Likes
1 Solution
RupakC
Moderator
Moderator
Moderator
First like given 50 solutions authored 100 replies posted

Hello @FranCruzarianic 

The use of bitfields in controllers is a standard practice and is used extensively in the industry. Such a method is user friendly and simple to use. However, if you wish, you may use other methods to perform the same operation. 

Thanks and regards

RupakC

View solution in original post

0 Likes
1 Reply
RupakC
Moderator
Moderator
Moderator
First like given 50 solutions authored 100 replies posted

Hello @FranCruzarianic 

The use of bitfields in controllers is a standard practice and is used extensively in the industry. Such a method is user friendly and simple to use. However, if you wish, you may use other methods to perform the same operation. 

Thanks and regards

RupakC
0 Likes