2021-09-29 01:38 PM
I hope this thread is posted in the right category.
I’ve been using Arduino boards for several years and am thinking of using a Nucleo 144 board (specifically, Nucleo-F207ZG) for a project. Once the project is completed, it will be serve as a permanent peripheral attached to a computer; serial data will be sent back and forth from the Nucleo to the computer. The computer will be running Windows 10.
In this setup, it will be important that the code uploaded to Nucleo can’t be overwritten or deleted. It will also be essential that the board won’t be recognized as a storage device in Windows.
I am completely new to Nucleo boards. Is there a way to prevent new sketches from being uploaded to the board? Is it possible to prevent the board being recognized as a storage device in Windows?
2021-09-29 02:15 PM
> Is it possible to prevent the board being recognized as a storage device in Windows?
The board has two USB connectors. The one you use to program (CN1) is connected to the onboard ST-Link chip. There is no way to modify how this behaves or how it shows up on your PC.
However, you can power the board from the other USB port. In this case, the board won't show up at all on the PC unless you have firmware that specifically implements a USB device.
> Is there a way to prevent new sketches from being uploaded to the board?
You can set RDP level 2 to prevent a program from being changed or read out. This process is not reversible. I do not recommend using it, but rather to reassess your need to prevent changes to the firmware.
2021-09-29 02:32 PM
>However, you can power the board from the other USB port. In this case, the board won't show up at all on the PC unless you have firmware that specifically implements a USB device.
@TDK thanks for the information. I have a couple of newbie follow-up questions:
After programming the Nucleo, could I break off the programming part of the board, and then use the other USB port to connect the Nucleo to the computer?
Would the connection using the other USB port (I think this is labeled CN13) allow for serial communication between the Nucleo and the PC?
Is there any way of (inadvertently) deleting a sketch on a Nucleo board that is only connected via USB/CN13? For instance, when using an Arduino Due, one can open and then close serial communication at 1200bps. This erases the flash memory on the Due. Are there any such methods of deleting a sketch on a Nucleo board?
2021-09-29 02:48 PM
> After programming the Nucleo, could I break off the programming part of the board, and then use the other USB port to connect the Nucleo to the computer?
Yes.
> Would the connection using the other USB port (I think this is labeled CN13) allow for serial communication between the Nucleo and the PC?
Generally not, but it's possible. You would need to implement a USB VCP serial port on the board firmware, which is nontrivial.
> Is there any way of (inadvertently) deleting a sketch on a Nucleo board that is only connected via USB/CN13?
Not really. If it was in bootloader mode, you could erase it using the DFU protocol. But it's not going to boot up in bootloader mode.
> For instance, when using an Arduino Due, one can open and then close serial communication at 1200bps. This erases the flash memory on the Due.
That sounds awful. Nothing like that here.
2021-09-29 03:02 PM
>Generally not, but it's possible. You would need to implement a USB VCP serial port on the board firmware, which is nontrivial.
As an alternative to enable serial communication between the Nucleo and the pc, is it possible to use a USB-TTL adapter and connect only the RX(D0) and TX(D1) of the Nucleo to the TX and RX of the TTL adapter?
This, of course would require the board to get its power independently of USB. Can the Nucleo be powered--for example--by a 5v transformer?
2021-09-29 03:05 PM
2021-09-29 03:09 PM
>Yes, you can use a UART adapter.
Sorry to ask for clarification :) , but with a UART adapter, could I break off the programming part of the board and then be fully able to use serial communications through RX(D0) and TX(D1) without having to set up a solution using firmware?
2021-09-29 03:13 PM
2021-09-29 03:20 PM
>You’ll need to have UART communication implemented in firmware
Would this be a complicated task? What steps would be required to do this?
I had planned to program the Nucleo using the Arduino IDE. Will implementing UART communication in firmware create a conflict with using the Arduino IDE?