Fastest SPIM instance pin and Trace pin configuration

Hi,

This question is about 5340. I would like to use SPIM4 instance at fastest 32M speed. According to datasheet this instance needs to use dedicated pin assignments, and these pins happen to be trace pins as well. So I would like to clarify some ambiguities:

1. as in following screenshot, P0.11 is the "dedicated CSN" pin for SPIM4. while MISO/MOSI/SCK pin looks reasonable to ask for high drive, is CS pin really need that high drive config? Can I use other pin as CSN for SPIM4?

Also, in case I would like to attach more than one spi devices on this bus, it seems using other pin as CSN is inevitable, can I do that safely?

2. I do not need DCX function in my SPI connection. Can I use this pin for other purpose?

3. As P0.11 and P0.12 is multiplexed with Traceclk and traced0(SWO), I am not very sure about the default behavior of these 2 pins. If I attach debugger to these 2 pins, will they automatically turn into trace function, or I still need to reconfigure them somewhere? And these pin will just back to SPI function as soon as I remove the debugger?

Thank you!

Parents
  • Input from our development team: We expect SPIM4 to work at 32MHz when MCUSEL is set to Peripheral for SCK/MOSI/MISO and MCUSEL is set to AppMcu for CSN with a different pin. However we must stress that there's not been done timing analysis for this case, so we do not guarantee the high speed timing with the dedicated setting.

    Best regards,

    Simon

  • Thank you for the detailed explanation. This clarified my first question. 

    I think this should address my 2nd question too, as I can use MCUSEL to set DCX pin to other function in similar way, and I assume that should not break the normal SPI communication. 

    About my 3rd question, I am still bit not very clear. In case using other pin for CSN does not work, i.e., I still need to use P0.11 as dedicated CSN pin, then I have to multiplex this pin with TRACED0/SWD function.

    According to my reading so far, I need to explicitly in my code to set P0.11 to trace function in order to connect to debugger, so in that case the SPI function can not work in trace mode, am I right?

  • Indeed, if you're not able to use another CSN pin for SPIM4, you won't be able to do tracing while using SPIM4, as these are the only pins supporting the TRACE feature.

    Best regards,

    Simon

Reply Children
Related