STM32 - SWD conflict with Activate NOE  - Page 1
Forum section: electronics / general

author: girishv
author_rank: Regular Contributor
timestamp: December 12, 2020, 08:50:10 am
content: I am new to STM32 ecosystem. I am creating a breakout board for STM32L0. In CubeIDE, I configured the pinout as followsSys: Enable "Debug Serial Wire"USB: Enable "Device FS"In USB section, the "Activate NOE" is disabled with the following warning messageConflict with SYS: "Debug Serial Wire".I am aware of "USB NOE" and "SYS_SWDIO" sharing the same pin.What are the implications of the above warning?

author: LootMaster
author_rank: Regular Contributor
timestamp: December 12, 2020, 03:07:26 pm
content: You're too bad...

author: S. Petrukhin
author_rank: Super Contributor
timestamp: December 12, 2020, 05:24:26 pm
content: Quote from: LootMaster on December 12, 2020, 03:07:26 pmHe texted: "I'm new to the STM32 ecosystem"

author: newbrain
author_rank: Super Contributor
timestamp: December 12, 2020, 06:21:35 pm
content: Which STM32L0 and package are you using?Generally speaking, the warning can be safely ignored:USB_NOE can be remapped somewhere else, if needed, in packages with 64 pins or more.Moreover, it is not an essential pin: it just mirrors the Output Enable status of the internal physical layer driver.So, you should still be able to use the USB peripheral (and SWD!).Quote from: LootMaster on December 12, 2020, 03:07:26 pmBecause, of course, you know everything, never make mistakes, and, especially, are always ready to help others.

author: girishv
author_rank: Regular Contributor
timestamp: December 13, 2020, 02:39:45 am
content: Quote from: newbrain on December 12, 2020, 06:21:35 pmI am using STM32L063C8T6 (LQFP-48).

author: newbrain
author_rank: Super Contributor
timestamp: December 13, 2020, 06:16:30 pm
content: Quote from: girishv on December 13, 2020, 02:39:45 amSo, USB_NOE is not available if you want to keep SWD active (highly recommended).As said, this is not a big deal, and USB can be used with no problems.Remember that CubeMX will always give warnings when some pin can not mapped.The peripheral function can still be usable though, as in this case.If some peripheral or function cannot possibly be configured (no alternative mapping for its essential pins), it'll appear in red.Code can still be generated, for the other configured peripherals.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: December 13, 2020, 08:37:16 pm
content: Quote from: newbrain on December 13, 2020, 06:16:30 pmFrom myself I will add. The STM does not have fuses that are controlled by the programmer as Atmel. All configuration is performed programmatically by your program. CubeMX generates the initialization source code from the checked boxes and hides it from you. If you really need to use programming pins, you can switch them in the program at any time, most often in the initialization section. This does not interfere with programming, because the programmer resets the processor, after resetting they again become the programmer's pins and are used until the firmware starts running. But you will need to connect a hardware reset wire to the programmer. One problem is that if you disable SWO in the program and use its pins, you will not be able to perform step-by-step debugging on the chip.

author: girishv
author_rank: Regular Contributor
timestamp: December 14, 2020, 03:48:27 am
content: Quote from: newbrain on December 13, 2020, 06:16:30 pmI almost ignored the warning. The turn around time for a board is almost 2 weeks. So, I sought help in forum.

author: girishv
author_rank: Regular Contributor
timestamp: December 14, 2020, 03:55:17 am
content: Quote from: S. Petrukhin on December 13, 2020, 08:37:16 pmI suppose I could use a jumper to switch to SWD_IO?

author: newbrain
author_rank: Super Contributor
timestamp: December 14, 2020, 08:00:18 am
content: Quote from: girishv on December 14, 2020, 03:55:17 amReally not worth the hassle, and that would steal another useful pin.Unless you have a very specific requirement for using the USB_NOE signal - it would seem not, from your description - just forget about it.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: December 14, 2020, 08:53:27 am
content: Quote from: girishv on December 14, 2020, 03:55:17 amI try not to use pins SWD for other purposes and use cases with enough pins. I also leave and use SWO pin. But, if you really really need it, you can safely use them as you wish. In other designs, not in this case with USB - here, you can say that you lose the extra signal and it is not needed. A jumper is not required, just connect the pin in both directions at the same time. "Jumper" is required in the program - if you start using step-by-step debugging on a chip, the code part that disables SWD and releases pins will need to be disabled.

author: girishv
author_rank: Regular Contributor
timestamp: December 14, 2020, 09:24:36 am
content: Quote from: S. Petrukhin on December 14, 2020, 08:53:27 amI will keep it reserved for SWD. No point in complicating things. In addition, I am not short of I/O pins.