- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Do I need anything to init the HPS GPIO before I start using it from a bare metal application?
I start debugging from DS5 and it never gets past alt_setbits_word()
Does the FPGA have to be initialised before hand?? Or do the HPS GPIO work regardless of the FPGA programming status?
Doubt I'll get any answers/help ---- p***ing into the wind here...
#define GPIO_SPAN 0x1000 // 4 KB 4096DECIMAL
#define GPIO0_BASE_ADDRESS 0xFF208000
#define GPIO1_BASE_ADDRESS 0xFF209000
#define GPIO2_BASE_ADDRESS 0xFF20A000
#define gpio_swporta_dr 0x0 // 32 RW 0x0 Port A Data Register
#define gpio_swporta_ddr 0x4 // 32 RW 0x0 Port A Data Direction Register
int main(void) {
alt_setbits_word( GPIO1_BASE_ADDRESS + gpio_swporta_ddr, USER_IO_DIR );
alt_setbits_word( GPIO1_BASE_ADDRESS + gpio_swporta_dr, BIT_LED );
while(1)
{
puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
}
return EXIT_SUCCESS;
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you don't mind me asking, where did you find this design? or this is your own design?
I recommend that you go through this user guide on how to set up and debug using the ARM DS-5:
https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_bm.pdf
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI,
The alt_setbits_word lines came from an example of code. I can't remember what..... it was some example regarding a switch and a LED..... seems super super simple but does not work... I must have something wrong?
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I see, may I ask is there any error code? Or any booting issue?
Regards.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page