parallella fpga : how to give an interrupt from pl to arm ps - arm

I successfully implemented an "[accelerator in 15 minutes]"1 on parallella board. Now I need to send an interrupt from pl to ps. So I connected it to IRQ_F2P of Zynq processing system.
Now, how can I get this interrupt in arm processor?
Usual interrupt example using "XILINX SDK" tool which uses a JTAG. But in parallella , I don't have a JTAG. (I am coping the program to SD card and execute it from SD card using Ubuntu). So any suggestions are most welcome.
So for parallella, I tried to use the Xilinx SDK, but the header files are creating an error..
My one more doubt is "Is it possible to create a bsp using sdk tool and copy it into sd card and then make it run on parallella board. Will it work ?
If not, how do we get this interrupt in arm processor, because all example uses Xilinx header files like "xparameters.h, xil_printf.h, xcugic.h, etc" and these are connected to many other Xilinx functions.

Related

Programming external QSPI flash Raspberry Pi Pico

I want to reprogram the external flash of a raspberry Pico via SWD line.
This feature must be implemented in a different microcontroller, not from a Linux computer so the OpenOCD library cannot be used.
I already wrote a C library that is able to read and write in RAM and in core registers via SWD and I'm able to put the Cortex-M0+ into halt state.
I read many tutorials and documentation and those that are useful are:
http://markding.github.io/swd_programing_sram/
https://www.silabs.com/documents/public/application-notes/an0062.pdf
https://community.silabs.com/s/article/how-to-program-internal-sram-over-swd?language=en_US
but unfortunately they aren't clear enough.
Can you explain the sequence of commands that I should send to RP2040 to correctly upload the new firmware?
Thanks for your help!

STM32F407VG Disc board won't connect anymore

Context
I have accidentally uploaded some ARM Cortex M0-cmis files (core-cmFunc.h and core_cmInstr.h) to the STM32F407VG discovery board. After I noticed my mistake, I tried to undo it by changing my code and upload it again... but it said it couldn't make connection.
What I already tried
I've tried to get passed the USART interface of the discovery board by uploading the code directly on the ARM Coretex M4 chip via the bootloader. I connected BOOT0 to VDD and PB2(=BOOT1) to GND so the chip starts up in the Pattern1-mode. Then I connected PA9(=Tx) and PA10(=Rx) to an USB to TTL cable (by the use of a RS-232 chip in the cable) and reset the device. I started the "Flash Loader Demonstrator" from ST to make connection with the board (I've done this before and it worked). But that didn't made connection either.
Extra information
The Windows filemanager "sees" the ARM Cortex M4 file when it gets connected to the PC;
Led LD7 emits green light when the board is powered;
Led LD1 emits red light;
Does someone knows how I can factory-reset the flashmemmory of the STM32F4 so it acts at it should again?
After some trial and error I've come to the conclusion that I accidentally activated the OTG_VBUS with my code. I couldn't upload another code because that bus was active on PA9(TX of USART2). It seems that the VBUS was held active, even in bootloader mode.
PA9 connected to VBUS
The solution to this problem was the use of another bootloader interface, I used USART3 on PB10/11, but you could also use PC10/11. After I uploaded a dummy code in that manner, I
was able to upload codes with the Coocox-IDE again.
Other Bootloader interfaces

How to connect on Nucleo with GDB?

I am using arm-none-eabi toolchain to create binary file for Nucleo which I then flash to the Nucleo using the USB virtual storage device it provides.
I am compiling the program with -ggdb. But how could I possibly connect to the nucleo and execute breakpoints on it? I can't even imagine how could it work, but I'm complete beginner.
Can I connect? How?
Yes you can connect, at least from a Linux host. I never tried from Windows system. Use OpenOCD to open a debug port and connect gdb (used arm-none-eabi-gdb) to this port with "gdb extended-remote" command. I am using this method from Linux host PC to connect to a custom board based on STM32L4 series for debugging and collecting log messages. Nucleo boards are also using the same series of STM controller.
For what it's worth there's a free IDE call EMBlocks that I've used in the past. I think the new version is called EMBitz https://www.embitz.org/
I've used it to both flash the STM32 Nucleo boards as well as debug the flashed image file.
A quick search also turns up this website that seems to indicate you can use GDB with the stlink utility. https://openenergymonitor.org/emon/node/6189

Arduino code Wire ported to Atmel Xplained Mini to communicate with DS3231

I am taking Arduino Prototype code used for a DS3231 RTC and taking it to an embedded platform that does not directly support Arduino code (right now that is the Atmel Xplained Mini). Is there a way for me to create an equivalent program without writing an entire I2C protocol and the entire data communication from scratch? There must be an overlapping library/header/code block that I can adapt to my purpose.
As an example I am looking to make the code here work on the Atmel Xplained Board. The code should be pretty simple, what I need is for the DS3231 to tell the MCU the time when it asks for it. I can do the manipulation of the date/time myself, it is getting that information on a non-Arduino platform that is the road block for me.
Arduino has an existing wiring library that facilitates I2C communication, most professional development frameworks aren't quite so simple but are also more full-featured. I'm assuming you are using Atmel Studio, you'll want to look at the TWI (two-wire interface) documentation for doing I2C communication.
AVR315: Using the TWI Module as I2C Master
You can copy TWI_Master.c and TWI_Master.h to your project and use these for I2C communication. That is what I've typically done in the past.
The demo code that goes with this app note can be found here, main.c has an example of the usage of this I2C driver:
AVR315 Demo Code

Communication with mbed using C

How can I communicate with an mbed LPC1768 using C without using a terminal emulator like minicom or teraterm?
For example if I send an integer from my C code than that led should be turned on.
How can I do this?
Without reading user manual or datasheet you can't do any thing to your board. So just go through it then follow below link for demo application LPC1768 board
1.NXP LPC1768 ARM Cortex-M3 Red Suite Demo
2.LPC1768 ARM Cortex-M3 CrossWorks Demo
3.mbed
4.At github
If you are using linux or osx check out the following answer:
How do I read data from serial port in Linux using C?
You can check your /dev folder and look for a file that is created when you plug your mBed. The file name would be something like /dev/ttyS0. That file represents the communication port, you can read/write that file to receive/send data over serial port.
If you want a cross platform solution try RxTx library for Java.
You can use this library
what it does, is that it initialize UART port which is connected to the debugger on your board and use it as serial input output. so with any hyper terminal of your choice, you can write code to do something if you send certain string of characters or just use original printf when something happens. and it will be printed on your PC screen.

Resources