This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280037: SE External Oscillator Used for CAN Boot Mode

Part Number: TMS320F280037


Hello all,

We are planning on using CAN boot to load and execute our application from RAM. But our design requires the use of a single-ended oscillator connected to X1. From the documentation and reviewing the Boot ROM code in the C2000 library, it looks like the ROM initializes the clock settings such that it expects a crystal on X1/X2. In the main application code, we use X2 GPIO as a signal output.

Using the debugger and setting the emulated Boot Config addresses, I was able to set the boot mode to CAN in SEND_TEST mode. CAN packets were transmitted at 125Mbps as expected (external OSC is 25MHz, and packets were not ACK'd so the automatic retry constantly sent 0x0320 packet) 

Although it appears to work with XTALCR.SE = 0, this configuration is in question. What risk is there in using a SE oscillator for the Boot ROM for CAN Boot Mode? In the normal application we do set XTALCR.SE.

For our application, we cannot use a standard crystal.

Thanks!

  • I just found this posting: TMS320F28379D: Oscillator Selection Bit

    This mentions that there is not difference in how crystal is handled versus SE oscillator. Is this bit just so X2 can be used as GPIO? In that case, since the Boot ROM is not using X2 as GPIO, is it safe to operate this way?

  • Hi Jay,

    The equivalent of the F280039 oscillator is a pierce inverting oscillator.  In XTAL mode, it is a high gain opamp that has X1 and X2 as feedback path that powers the crystal and sustains its oscillation.  Driving a fixed clock source to X1 when not in SE mode (SE = 0) while leaving X2 floating, like the case that you described in CAN boot mode where configuration is set to XTAL mode, would seem to break the feedback path but there actually is a large resistance between X1 and X2 which still mimics a closed loop, except that startup and oscillation is always guaranteed to happen with the fixed 25MHz input.

    This case is unique in that it was not intended to be operated in this manner but it will surely work as described above.  The only thing not quantified with this unique use case is any impact to the clock.  Fortunately, CAN protocol has built in mechanisms to detect data integrity if a non-reliable clock is used.  CAN will report either a bit1 or bit0 error for deterministic bits in the control field not matching because of an issue with the clock and even indicate this with a CRC error if bit values are incorrect.  It may even trigger a bus off if there are way too many errors. Besides, the CAN boot mode is running relatively low (125kbps) so any jitter impact may be negligible.

    For the other question, if in SE mode (SE=1).  X2 can be used as another GPIO (GPIO18).

    Regards,

    Joseph

  • Thanks for the thorough response. X2 is actually connected to an active circuit and shouldn't be toggling until the main code is running (since the main code starts transactions on that pin). In my bench tests, this line was held low be default. In the real system, it could be high, but would be static. So it is not floating. Does this change anything or make the configuration more/less stable/reliable?

    My question about SE and GPIO was more about the internal architecture of that pin; that is, was the reason SE existed as a setting was just to configure that input as a GPIO, and that it performed no other functions. You answered that in the first paragraph of your response.

    Jay

  • Hi Jay,

    What would be the load on X2?  Would that be high impedance that is greater than ~10K?  In XTAL mode, the crystal oscillator drives the quartz for up to max power of 1mW.  As long as the X2 load is greater than 10K, you are not running the risk of overloading the oscillator circuit.

    Joseph

  • OK so unless you switch the Boot Mode into CAN, X1 and X2 are configured as GPIO and this is not an issue. Since I am using CAN Boot Mode, these get configured as XTAL and I run the risk of damaging the part. Since we are using it as an input, it should be fairly high impedance, but I will need to verify.

    Probably the best move is to use a XTAL in CAN Boot Mode, period. Our backup plan is to use SCI, which relies solely on the internal oscillator.

    Thanks for the clarification. I will check on the load and respond.

    Jay

  • Jay,

    OK, let me know if you have any more queries.

    Regards,

    Joseph

  • Thanks, Joseph. We will probably be changing our connections in a future revision to not use X2.