Main Site Documentation

Registers in G80


#1

I have problem to write data to any register in G80.

Example:
Register rSRAM = new Register(0x40024000, 0x55555555);
Debug.Print("rSRAM.Value : " + rSRAM.Value.ToString(“X8”));

Debuger show
rSRAM.Value : 00000000


#2

The backup SRAM registers have a lot of requirements around their use, it isn’t as simple as writing to one. Try reading a different register, like device ID or a GPIO mode register.


#3

Hello, John!
At first, sorry for my bad english.
My target - to work with USB-HOST on low level.
Because, my device (printer), when it connected to my board, based on G80, stopt my application.
I try to reseach this problem by using operations with registers. But I can’t write data to any of USB Host registers.

For example.

GINTMSK = new Register(0x40040018);
GINTMSK.Value = 0x62400016;
Debug.Print(" GINTMSK.Value : " + GINTMSK.Value.ToString(“X8”));


Debug show:
GINTMSK.Value : 00000000


#4

Register access is good to give you access to specific registers but you can’t write complete drivers using register class. It would be very difficult and inefficient. A better approach is to use RLP.

Unfortunately, for the problem you are describing you may need us to help investigate the problem and find a solution. Is this for a commercial product or school project? If for commercial project, I suggest you contact us directly to find the best way to help you out.


#5

Hello!
I tried to connect my printer to the board, based on G120.
It was connected!
I received 3 devices and too mach endpoints.
May be host USB of G80 have not possibility to work with this configuration?

Debug show:

Serial Connected

Index = 0000
ID = A09F7194
Port = 0
VID = 0DD4
PID = 2023
Type = 12
Number of configurations . . . 1
Max Packet size . . . . . . . 64
Protocol code . . . . . . . . 01
Release number . . . . . . . . 100
Serial number index . . . . . 03
Subclass code . . . . . . . . 02
USB sepecification number . . 200
=== Interface ===
Class: Communications/CDC
SubClass: 2
Number: 0
Protocol: 1
Type: 4
– Endpoint –
Attributes: 3
Address: 0086
Type: 5
Interval: 8
MaxPacket: 64

=== Interface ===
Class: CDC-Data
SubClass: 0
Number: 1
Protocol: 0
Type: 4
– Endpoint –
Attributes: 2
Address: 0001
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 2
Address: 0082
Type: 5
Interval: 1
MaxPacket: 64

=== Interface ===
Class: Image
SubClass: 1
Number: 2
Protocol: 1
Type: 4
– Endpoint –
Attributes: 2
Address: 0083
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 2
Address: 0004
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 3
Address: 0087
Type: 5
Interval: 10
MaxPacket: 64

Unknown Device connected.
Index = 0001
ID = A09F7194
Port = 0
VID = 0DD4
PID = 2023
Type = 0
Number of configurations . . . 1
Max Packet size . . . . . . . 64
Protocol code . . . . . . . . 01
Release number . . . . . . . . 100
Serial number index . . . . . 03
Subclass code . . . . . . . . 02
USB sepecification number . . 200
=== Interface ===
Class: Communications/CDC
SubClass: 2
Number: 0
Protocol: 1
Type: 4
– Endpoint –
Attributes: 3
Address: 0086
Type: 5
Interval: 8
MaxPacket: 64

=== Interface ===
Class: CDC-Data
SubClass: 0
Number: 1
Protocol: 0
Type: 4
– Endpoint –
Attributes: 2
Address: 0001
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 2
Address: 0082
Type: 5
Interval: 1
MaxPacket: 64

=== Interface ===
Class: Image
SubClass: 1
Number: 2
Protocol: 1
Type: 4
– Endpoint –
Attributes: 2
Address: 0083
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 2
Address: 0004
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 3
Address: 0087
Type: 5
Interval: 10
MaxPacket: 64

Unknown Device connected.
Index = 0002
ID = A09F7194
Port = 0
VID = 0DD4
PID = 2023
Type = 0
Number of configurations . . . 1
Max Packet size . . . . . . . 64
Protocol code . . . . . . . . 01
Release number . . . . . . . . 100
Serial number index . . . . . 03
Subclass code . . . . . . . . 02
USB sepecification number . . 200
=== Interface ===
Class: Communications/CDC
SubClass: 2
Number: 0
Protocol: 1
Type: 4
– Endpoint –
Attributes: 3
Address: 0086
Type: 5
Interval: 8
MaxPacket: 64

=== Interface ===
Class: CDC-Data
SubClass: 0
Number: 1
Protocol: 0
Type: 4
– Endpoint –
Attributes: 2
Address: 0001
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 2
Address: 0082
Type: 5
Interval: 1
MaxPacket: 64

=== Interface ===
Class: Image
SubClass: 1
Number: 2
Protocol: 1
Type: 4
– Endpoint –
Attributes: 2
Address: 0083
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 2
Address: 0004
Type: 5
Interval: 1
MaxPacket: 64

– Endpoint –
Attributes: 3
Address: 0087
Type: 5
Interval: 10
MaxPacket: 64


#6

CDC is a common interface that can be supported. The best way to support it would be for us to connect it to our USB analyzer for starter. More information is necessary.


#7

As you advice me, I tried use RLP.
But, unfortunately I can’t find in folder RPL_Examples folder for G80.


#8

Gus misspoke, RLP is not supported on the G80. You only have access to Register and AddressSpace.


#9

Hi!
I tried to connect my G80 board to other device with CDC class.
Result same as with my printer. Programm stop working.
Therefore, I think that common problem of G80 in host USB with CDC class devices.
Can you advise somethink?


#10

The way forward is through our consulting services. We can discuss your needs and create a solution for you.


#11

I can’t understand. This is standard function - to work with CDC-class devices. If it not work - it means, that G80 has bugs. Is’nt it?


#12

Possible and this is why we need to find the right solution, especially that TinyCLR is our focus but you are using NETMF.


#13

As I know, TinyCLR not support USB.


#14

Not yet, correct.


#15

when it will be ready?


#16

http://docs.ghielectronics.com/software/tinyclr/roadmap.html

But like I said earlier, if you are using this commercially then you may want to discuss your needs with us directly.


#17

Yes, my project commercial.
Is it possible make USB connection under the TinyCLR, using library for microcontroller STM32F4?


#18

TinyCLR does have a lot more open feature for running native code on your device, including G80. While we haven’t done this ourselves so we can’t say for sure, it should technically be possibly through native code and the Marshal class in TinyCLR, perhaps even using third party libraries.


#19

Can you give me any idea or simple example how implement native code, based on USB library in TinyCLR?


#20

We don’t have anything for implementing specific features like USB, just a general guide on writing native code: http://docs.ghielectronics.com/software/tinyclr/native/intro.html