Issues on reading the deployment view configuration data
Hi,
I am having a peculiar issue reading the configuration data of a driver that is set in the deployment view. For the can driver i have defined in ASN.1 the attached data structure can.asn
Looking at the generated code in our model at binary.c/DriversConfig/leon_partition/DeviceConfig-node1-leon-can-pohic.c , i am able to see we are able to sucessfuly set the data structure values as printed below:
const __po_hi_c_Can_Conf_T pohidrv_node1_leon_can_pohic_cv = {
.driverpath = "/dev/rastaio0/grcan0",
.channel = 1,
.scaler = 7,
.ps1 = 15,
.ps2 = 3,
.rsj = 1,
.bpr = 0,
.txblock = 1,
.rxblock = 1
};
But when i run the binary in leon i get the following values
driverpath = "/dev/rastaio0/grcan0",
channel = 0
scaler = 1
ps1 = 0
ps2 = 7
rsj = 0
bpr = 15
txblock = 0
rxblock = 3
I did some investigation, and it seem there is a 32 to 64 bit issue, all value should have been handled as 32 bit, as instructed in po_hi_transport.c with the function call __po_hi_uint32_t* __po_hi_get_device_configuration (const __po_hi_device_id dev)
.
But it seems in the file asn1crt.h, we are defining integer values as 64 bit, with the WORD_SIZE definition
#ifndef WORD_SIZE
#define WORD_SIZE 8
#endif
#if WORD_SIZE==8
typedef asn1SccUint64 asn1SccUint;
typedef asn1SccSint64 asn1SccSint;
#else
typedef asn1SccUint32 asn1SccUint;
typedef asn1SccSint32 asn1SccSint;
#endif
Best regards,