博文

How to fix Arduino Uno COM3 error?

图片
 On Windows, a “COM3 error” with Arduino Uno usually means the PC can’t talk to the board on that serial port . Let’s go step by step from easiest to deeper fixes. I’ll assume you’re on Windows and using the Arduino IDE; if not, tell me your OS and I’ll adapt. 1. Basic checks (do these first) Unplug and replug the USB cable Use a different USB port on the PC. If possible, try a different USB cable (data cable, not a charge-only phone cable). Close anything else using COM ports Serial Monitor from another IDE Terminals like PuTTY, Tera Term, CoolTerm Manufacturer tools (ST-Link Utility, other dev tools) If another program has COM3 open, Arduino can’t use it. Restart the Arduino IDE Close IDE → reconnect Uno → then reopen IDE. 2. Make sure the right port is selected In Arduino IDE : Go to Tools → Port Look for something like: COM3 (Arduino Uno) or COMx (Arduino Uno) if it changed. Select the one that says Arduino Uno . ...

What is the preferred way to install STM32CubeIDE on Linux?

图片
 The “normal” / preferred way is to use ST’s own Linux installer script for your distro, not random third-party packages. On Linux ST actually offers three bundles , all installed the same way:  ...rpm_bundle.sh → for Fedora / RHEL / CentOS / openSUSE (RPM-based) ...deb_bundle.sh → for Ubuntu / Debian (Deb-based) plain .sh → generic Linux (good fallback if the distro is too new and the deb/rpm bundle complains about deps) 1. Recommended installation (any distro, using ST installer) Go to the official STM32CubeIDE page and download the Linux installer for your architecture.  Open a terminal in the download folder. Make the installer executable (optional but nice): chmod +x st-stm32cubeide_*_amd64*.sh Run it with root privileges: sudo sh ./st-stm32cubeide_*_amd64*.sh Replace the * with whatever version string you downloaded, e.g. st-stm32cubeide_1.16.0_36100_20240131_1500_amd64.sh Follow the text-mode wizard (license, install ...

How to practice with FPGA without a physical board?

图片
 You can get really good with FPGAs without ever touching a dev board, as long as you treat it like “real” hardware design and not just theory. Here’s a practical roadmap. 1. Learn HDL by Writing & Simulating Designs Pick one HDL to start: Verilog / SystemVerilog – very common in industry. VHDL – common in Europe & aerospace. (Later you can learn both; don’t juggle two at once.) Then use a simulator : Vendor tools (free editions): Xilinx Vivado’s built-in simulator (for Verilog/VHDL). Intel Quartus with ModelSim/Questa Starter. Open-source: GHDL (VHDL). Verilator (Verilog/SystemVerilog, very fast, good for bigger projects). Online playgrounds like EDA Playground (no install, great for quick experiments). Practice flow: Write a tiny module (e.g., 4-bit adder, counter, FSM). Write a testbench that: Drives inputs (clk, reset, data). Checks outputs with $display , assertions, or waveforms. Run simulation and i...

How do i install QJoyPad on Raspberry Pi operating system?

图片
 You install QJoyPad on Raspberry Pi OS just like any other Debian package – it’s in the standard repos.  Here’s the quick way: 1. Update your package list Open a terminal on your Raspberry Pi and run: sudo apt update (This makes sure you see the latest versions in the repository.)  2. Install QJoyPad Still in the terminal: sudo apt install qjoypad That’s it – this pulls QJoyPad and any needed libraries from the Raspberry Pi OS repo.  QJoyPad is a Qt program that maps joystick/gamepad input to keyboard/mouse events under X11 (the normal Raspberry Pi desktop).  3. Run QJoyPad On Raspberry Pi OS with Desktop: Log into the graphical desktop. Either: Press Ctrl+Alt+T and run: qjoypad & Or find QJoyPad in the main menu (often under Games or Accessories , depending on your setup).  From there you can: Create a new layout . Click each button/axis and assign a key or mouse action. Save the layout (and optionally se...

What is IAP in microcontroller?

图片
 In microcontroller context, IAP almost always means In-Application Programming . 1. Basic idea In-Application Programming (IAP) = The MCU can re-program its own Flash while your application code is running , without needing an external programmer (ST-Link, J-Link, etc.) or going into a separate factory programming mode. So instead of: PC → programmer → MCU (ISP / SWD / JTAG) you can do: PC / other device → your firmware → MCU’s Flash (via IAP) Your code acts as its own flash programmer . 2. IAP vs ISP vs bootloader ISP (In-System Programming) Usually means programming via a debug/programmer tool (JTAG/SWD, UART, etc.) Often uses a bootloader mode that runs instead of your application. Bootloader Small piece of code that runs first after reset. It may: Check for a new firmware image, Receive it over UART/USB/CAN/etc., Program it into Flash (using IAP services), Then jump to the main application. IAP The mechanism by whi...

How to Install Arduino Libraries?

图片
 You install Arduino libraries in three main ways: via Library Manager, 2) by adding a ZIP, or 3) manually copying a folder. I’ll walk you through all three. 1. Install via Library Manager (easiest & recommended) Works for: Arduino IDE 1.8.x and 2.x Open the Arduino IDE . Go to: IDE 2.x: Sketch → Include Library → Manage Libraries… IDE 1.8.x: Sketch → Include Library → Manage Libraries… In the Library Manager window, type the library name into the search box (e.g. “Adafruit NeoPixel”, “AccelStepper”, “Servo”). Click the library you want, then click Install . Wait until it shows INSTALLED . How to use it after installing In your sketch, add: # include <LibraryName.h> Or go to Sketch → Include Library and select it from the list; the IDE will add the #include line for you. 2. Install from ZIP file Sometimes authors give you a .zip instead of publishing to Library Manager (e.g. GitHub repos). Download the .zip file ...

What does RCC mean on STM32?

图片
 On STM32 , RCC stands for Reset and Clock Control . It’s a big central block inside the microcontroller that is responsible for: Clocks (the “C” in RCC) RCC generates and distributes clocks to: The CPU core Buses (AHB, APB1, APB2, etc.) Peripherals (GPIO, USART, SPI, I²C, TIM, ADC, etc.) Typical things RCC does: Select clock sources: HSI (internal), HSE (external crystal), PLL , LSI , LSE , etc. Set prescalers to divide clocks for different buses. Choose the system clock (SYSCLK) and derived clocks like HCLK, PCLK1, PCLK2. Resets (the “R” in RCC) RCC can reset: The entire chip (system reset) Individual peripherals (e.g. reset just USART1, SPI2, etc.) This is used to: Bring peripherals to a known default state Recover a misconfigured peripheral by toggling its reset bit. Enabling / disabling peripheral clocks Before you can use most peripherals on STM32, you must enable their clock in RCC . Examples: // HAL example ...