Peripheral UART sample code is missing a #define statement

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

cross mob
ShawnA_01
Employee
Employee
10 questions asked 5 comments on KBA First comment on KBA

The BCM920732 HW Application Note (MMP920732HW-AN101.pdf) describes the BCM20732 Hardware Interfaces and provides sample code on how to program the various BCM20732 interfaces


The document (dated Jan 15th, 2014) describing the Peripheral UART states your application needs to #include the "puart.h" file.  Several lines later there is a call to: P_UART_INT_CLEAR(P_UART_ISR_RX_AFF_MASK).

As of SDK 1.1.0, the example code throws a fairly cryptic compiler error of:  "error: lvalue required as left operand of assignment".  There are several other (macro style) calls to the Peripheral UART configuration macros in the sample that will throw the same compiler error.

Future versions of the application note, and/or the SDK source file will fix this problem officially.   In the interim, you can solve it yourself by adding:

#define REG32(x)  *((volatile UINT32*)(x))


to the top of the file:   ~include/Drivers/puart.h

just before the

#define UART_REG            REG32

1 Reply
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog
0 Likes