Go to advanced search

by rst
Wed Dec 04, 2013 11:20 am
Forum: Bare metal, Assembly language
Topic: USB (DWC) Enumeration ?
Replies: 11
Views: 7860

Re: USB (DWC) Enumeration ?

Tom, seems to be a more complicated issue. First it is not the same thing getting the port speed from the DWC OTG HCD host port (via memory host port register at 0x20980440 bits 17/18) and getting it from a port of the root hub which is connected directly to the DWC OTG HCD host port (on Raspberry P...
by rst
Thu Nov 28, 2013 3:44 pm
Forum: Bare metal, Assembly language
Topic: USB (DWC) Enumeration ?
Replies: 11
Views: 7860

Re: USB (DWC) Enumeration ?

Tom, for each hub port I do the following to get the speed of the attached device: ControlMessage (SET_FEATURE, PORT_POWER) to power on port MsDelay (m_pHubDesc->bPwrOn2PwrGood * 2) ControlMessage (GET_STATUS) from port and check wPortStatus if device is connected to port ControlMessage (SET_FEATURE...
by rst
Fri Nov 22, 2013 11:24 am
Forum: Bare metal, Assembly language
Topic: USB (DWC) Initialization?
Replies: 4
Views: 2230

Re: USB (DWC) Initialization?

Tom, yes it's different. The 0 must be written to 20980E00 later too. But the first thing in USB init is to power on the USB circuit. This is done via GPU mailbox 0 which works equal like mailbox 1 which is used to initialize the frame buffer. I got this information from CSUD by Alex Chadwick. You f...
by rst
Thu Nov 21, 2013 8:40 am
Forum: Bare metal, Assembly language
Topic: USB (DWC) Initialization?
Replies: 4
Views: 2230

Re: USB (DWC) Initialization?

The USB circuit has to be powered on by writing a 0x80 to the power management mailbox before doing the reset. Are you sure you have done that?

Rene
by rst
Tue Jun 11, 2013 8:44 pm
Forum: Bare metal, Assembly language
Topic: learning from kernel source
Replies: 4
Views: 1496

Re: learning from kernel source

I think learning from the Linux kernel source is not an easy thing. Because Linux is a big big system which is ported to several platforms the functionality is often spread around many files in different directories. Nevertheless it is often the only working reference. When you want to learn how to ...
by rst
Fri May 31, 2013 10:40 am
Forum: Bare metal, Assembly language
Topic: About Vitrual memory
Replies: 16
Views: 4097

Re: About Vitrual memory

What is 1 to 1 mapping and how do we achieve it. 1:1 mapping means both virtual and physical addresses are equal over the hole 4GB range. I am talking here about the ARM processor in the Raspberry Pi which uses 32 bit addresses. Virtual addresses are generated by a program (application or operating...
by rst
Wed May 15, 2013 4:48 am
Forum: Bare metal, Assembly language
Topic: Possible Tool Chain Problem (Solved)
Replies: 4
Views: 1147

Re: Possible Tool Chain Problem

When I had such diffuse problems it was often caused by a stack not set properly. Recently I searched for a week for the reason why my code worked a bit but not reliable. I also asked myself if the compiler or linker has a problem. But this was not the cause. I did set the r13 (stack pointer) but no...
by rst
Thu May 09, 2013 10:28 am
Forum: Bare metal, Assembly language
Topic: memory or compiler issues
Replies: 17
Views: 2367

Re: memory or compiler issues

why does it have to do instruction after the branch to uart1printf?! and afterwards I saw some line like this inothers function but not all, aswell as in the debug sections in the dissasembly of the main.o with -g. so if this is a problem, it comes from the compiler... It doesn't come from the comp...
by rst
Wed May 08, 2013 7:38 pm
Forum: Bare metal, Assembly language
Topic: memory or compiler issues
Replies: 17
Views: 2367

Re: memory or compiler issues

I don't get how the compiler can know where to put the code and the variables. how does it know it is code and not data? Hi, the compiler knows it, because it produces the code or data and puts it into different sections. The linker takes these sections and places the items belonging into one secti...
by rst
Tue May 07, 2013 8:28 am
Forum: Bare metal, Assembly language
Topic: Clearing the BSS - Infinite Loop?
Replies: 8
Views: 2122

Re: Clearing the BSS - Infinite Loop?

Hi Adam, I would suggest doing it not such "complicated". BSS is usually small and it take not much time clearing it even with byte access. This works for me: ldr r3, =_bss_end ldr r2, =_bss_start cmp r2, r3 bcs 2f sub r3, r2, #1 ldr r1, =_bss_end sub r1, r1, #1 mov r2, #0 1: strb r2, [r3, #1]! cmp ...

Go to advanced search