industrialNETworXnetx

Stefan Scheller

Stefan Scheller

| 03.02.2011 | 11:08 | 6 replies

DPM access within the cifX toolkit

Hello,

i've got a question regarding the access of the cifX-toolkit on the memory (mapped for DPM). Actually I've got a problem with the addressing mechanism of the MCU we use as host. Its Host-Bus is configured as 16 Bit (Address and Data multiplexed) interface with seperate byte-select-signals. The host-MCU allways addresses halfwords (one address accesses a 2 byte value) and therefore shifts the address towards the LSB when I try to access single bytes. The 16 bit wide access works fine.

So here is the actual question:

Do all accesses of the cifX-toolkit on the DPM use the OS_Mem...-functions? My idea is to adjust these to the address-mechanism of our host. Or is the driver accessing the DPM anywhere within the (HW-)functions?

kind regards

Stefan

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 03.02.2011 | 12:29

Currently the cifX Toolkit accesses the DPM at different places.

It uses OS_Memcpy to read and write larger areas (e.g. Status Blocks, I/O Areas) inside the cifXFunctions.c file or uses structured pointers to the DPM and accesses it using normal pointer arithmetic / indirection (e.g. ptChannel->tSendMbx.ulSendMailboxLength) inside the cifXHWFunctions.c file.

So just modifying the OS_Memcpy won't be enough as every DPM pointer access would also need to be rerouted to your special access methods.

But I don't know how you would access a 8-Bit Handshake Cell (i.e. in the System channel of the DPM), if you can only read/write word-wise, without influencing the next byte which would be the netX controlled Flags in this special case.

Regards,

MT

Stefan Scheller

Stefan Scheller

| 03.02.2011 | 13:09

Thank you for the detailed and fast answer! That was the kind of statement I need to decide how to go on!

In case of the 8-Bit Cell I would have done this by reading (2 Bytes), masking and modifying and then write it back.

kind regards

Stefan

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 03.02.2011 | 14:43

Stefan Scheller wrote:

In case of the 8-Bit Cell I would have done this by reading (2 Bytes), masking and modifying and then write it back.

Hm, This is what I assumed, but this can lead to an undetermined state of the other byte, if this is written from the netX side at the same time.

For the Handshake bits the first Byte is Host-->netX and the second Byte is netX-->Host. On netX100/500 the Bytes are Hardwarelocked against improper write, but this may change on newer chips and so you would destroy the flags the netX is writing to. Probably this may happen on other "shared" areas as well.

Regards,

MT

Stefan Scheller

Stefan Scheller

| 03.02.2011 | 14:51

Ok I allready suspected that it won't be as easy as that. Thanks again for this information! I think I have to "rewrite" the driver and adapt the addressing to the way our processor does it.

 

kind regards

Stefan

palmnz

palmnz

| 24.11.2011 | 03:40

Dear Stefan,

Would you please pass me the link with which I can download the cifX toolkit.

Best regards

 

Vincent

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 30.11.2011 | 08:18

Hello Vincent,

you will find the C-Toolkit on the Hilscher web page.

Regards
AJ

Login