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

XMC™ Forum Discussions

funkyluke
Level 2
5 sign-ins First like received 10 replies posted
Level 2

Hello,

I am working with the hardware gateway feature on the XMC4k.

For performance reasons I want to use a tx fifo on the gateway.

In chapter 18.3.10.7 of the reference it is suggested that the gateway source object replaces the fifo base object in this scenario.

However, this does not work. It only works when there is also a (tx)FIFO base object in the TX FIFO chain.

In the reference manual 18.3.10.4 and figure 18-20 it is also suggested that the fifo base object does not need to be part of the FIFO either, I also could not get the TX FIFO to work that way.

In the XMC47 CAN Example, the Gateway TX FIFO is configured in such a way that there is a base object and it is part of the FIFO chain. Why is this? Is the reference manual wrong here or did I understand it incorrectly?

Here are some config examples:

MO 0  - node 0 RX; MO1-4 node 1 TX

MO0 GW target 1-4; MO1 TX Base (1-4), MO2-4 TX Slave -> OK

MO0 GW target 2-4; MO1 TX Base (2-4), MO2-4 Slave -> not working

MO0 GW target 1-4; MO1-4 Slave -> not working

Can anybody clear this up for me?

0 Likes
2 Replies
funkyluke
Level 2
5 sign-ins First like received 10 replies posted
Level 2

Update:

Instead of using only Dave & XMClib I did some manual config as recommended in the reference manual.

I set MO0 as GW source with TOP=4 and BOTTOM=CUR=1; MO1-4 as TXFIFO Slave with CUR=0.

Then I manually set MO1.MOSTAT.TXEN1 like in a regular FIFO.

Then It worked as excpected - the gateway stored messages starting in MO1 and incrementing to 4, with the GW source CUR following accordingly. however, when MO0.CUR wrapped back around to 1, the whole thing stopped working. Messages were still being copied over to the TX FIFO, but no transmissions  were taking place. 

TXEN1 was not being set, but manually setting it did not release the message either.

MOSTAT shows the same for all TX FIFO MOs:

funkyluke_0-1658339397585.png

What is going wrong? It feels as if I'm almost there.

0 Likes
funkyluke
Level 2
5 sign-ins First like received 10 replies posted
Level 2

OK I figured it out (partly).

FIFO base separate from FIFO slaves - still confused

Gateway instead of Base:

This is not possible since they work independently of each other. The TX FIFO base keeps track and controls the Tx logic of Messages queued for tx - the gateway (base) independently keeps track of the messages flowing into the TX FIFO - these two are not coherent and therefore need independent controllers.

0 Likes