Class: LinkDemo::FlashController

Inherits:
Object
  • Object
show all
Includes:
Origen::Controller
Defined in:
lib/link_demo/flash_controller.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) erase(options = {})



15
16
17
18
19
20
21
22
# File 'lib/link_demo/flash_controller.rb', line 15

def erase(options = {})
  set_ccob(0, 0x09)
  set_address(options[:address])
  launch
  tester.wait time_in_ms: 10
  cc 'Verify the command completed without errors'
  fstat[7..0].assert!(0x80)
end

- (Object) program(data, options = {})



5
6
7
8
9
10
11
12
13
# File 'lib/link_demo/flash_controller.rb', line 5

def program(data, options = {})
  set_ccob(0, 0x06)
  set_address(options[:address])
  fccob1.write(data)
  launch
  tester.wait time_in_us: 100
  cc 'Verify the command completed without errors'
  fstat[7..0].assert!(0x80)
end