Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPC1768: RAM end adjust fix #5189

Merged
merged 3 commits into from Sep 25, 2017

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Sep 25, 2017

The topmost 32 bytes used by IAP functions, this was not included in the RAM
end previously.

Running test multiple times to be certain this fixes it. The last 10 runs -- all OK

+-------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
| target      | platform_name | test suite                  | test case                 | passed | failed | result | elapsed_time (sec) |
+-------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
| LPC1768-IAR | LPC1768       | tests-mbed_drivers-flashiap | FlashIAP - init           | 1      | 0      | OK     | 0.05               |
| LPC1768-IAR | LPC1768       | tests-mbed_drivers-flashiap | FlashIAP - program        | 1      | 0      | OK     | 0.28               |
| LPC1768-IAR | LPC1768       | tests-mbed_drivers-flashiap | FlashIAP - program errors | 1      | 0      | OK     | 0.06               |
+-------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 3 OK
mbedgt: completed in 17.66 sec

@chrissnow

The topmost 32 bytes used by IAP functions, this was not included in the RAM
end previously.
@0xc0170 0xc0170 mentioned this pull request Sep 25, 2017
@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 25, 2017

@fkjagodzinski Can you please retest this with ARCH PRO?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 25, 2017

Update: I added critical section around IAP calls as RM suggests that. Tested again, all OK with LPC1768

@fkjagodzinski
Copy link
Member

I ran tests-mbed_drivers-flashiap test over 10 times on ARCH_PRO and didn't get a single error.

+--------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
| target       | platform_name | test suite                  | test case                 | passed | failed | result | elapsed_time (sec) |
+--------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
| ARCH_PRO-IAR | ARCH_PRO      | tests-mbed_drivers-flashiap | FlashIAP - init           | 1      | 0      | OK     | 0.04               |
| ARCH_PRO-IAR | ARCH_PRO      | tests-mbed_drivers-flashiap | FlashIAP - program        | 1      | 0      | OK     | 0.27               |
| ARCH_PRO-IAR | ARCH_PRO      | tests-mbed_drivers-flashiap | FlashIAP - program errors | 1      | 0      | OK     | 0.04               |
+--------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 3 OK
mbedgt: completed in 18.06 sec

@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 25, 2017

/morph test

@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 25, 2017

@chrissnow thanks for the help to narrow this down

@fkjagodzinski thanks for testing

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1382

Test failed!

From RM:

32.3.2.6 Interrupts during IAP
The on-chip flash memory is not accessible during erase/write operations. When the user
application code starts executing the interrupt vectors from the user flash area are active.
The user should either disable interrupts, or ensure that user interrupt vectors are active in
RAM and that the interrupt handlers reside in RAM, before making a flash erase/write IAP
call. The IAP code does not use or disable interrupts.
IAP typedef duplication removal
@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 25, 2017

Rebased to fix the error from above

@theotherjimmy
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1384

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants