missing edges detected XU216

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
avrobot
Member++
Posts: 16
Joined: Mon Jun 04, 2018 4:26 am

missing edges detected XU216

Post by avrobot »

Hi, we seem to be missing some edges on input changes (external devices send interrupts to xmos IC when data is ready on 4bit port).

Code: Select all

case p_4bit_inputs when pinsneq(int_val_curr) :> int_val_new:
    uint8_t int_changed = int_val_curr ^ int_val_new; 
    int_val_curr = int_val_new;
    if (input_changed & 1) ...action the change here by reading an i2c message that resets the [b]p_4bit_inputs [/b] bit.
    if (input_changed & 2) ...action the change here by reading an i2c message that resets the [b]p_4bit_inputs [/b] bit.
    if (input_changed & 4) ...action the change here by reading an i2c message that resets the [b]p_4bit_inputs [/b] bit.
    if (input_changed & 8) ...action the change here by reading an i2c message that resets the [b]p_4bit_inputs [/b] bit.
Sometimes we get situation where this "case" stops getting triggered.
Any obviously thoughts why?


User avatar
akp
XCore Expert
Posts: 541
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

Can you do something like issue a message over the xscope interface rather than doing the i2c? Just to reduce what's happening in the case statement. The other thing to consider is perhaps using an ordered select so other case statements can't take priority over this one