Other Parts Discussed in Thread: UNIFLASH
器件型号: TDA4VEN-Q1
Thread 中讨论的其他器件: UNIFLASH
在使用 TDA4VEN 的定制电路板上、我们尝试使用 UART Uniflash 通过 UART 对 OSPI NOR 闪存进行编程。
但是、在第一次写入操作(发送闪存写入器 (
sbl_uart_uniflash*.tiimage)) 之后、UART 通信始终在第二次写入操作期间停止(例如 PHY 调优或应用映像刷写)、并且刷写过程无法继续。
- 第一个操作(tiimage 传输)始终成功完成
- 在第二次操作开始后、UART 立即无响应、XMODEM 传输保持在 0%
- J722S EVM 上没有出现此问题
问题
- 启动闪存写入器 (tiimage) 后 UART 无法使用的行为是否是预期行为、或者与 TDA4VEN、UART Uniflash 或 OSPI 相关的已知限制?
- 使用时
uart_uniflash、是否有定制主板上不支持按顺序执行多个闪存写入操作或不可靠的情况?
对于此问题、我们希望确认根本原因和可能的对策、包括正确的先决条件和建议的操作流程。
存在许多风险
- Board:定制调试板
- 闪存目标:OSPI NOR 闪存
- 主机 PC 环境:Ubuntu
- 刷写方法:UART 引导模式+
uart_uniflash - 连接:主机 PC→USB 转 UART 转换器→SoC
程序和发现的问题
使用 UART Uniflash 配置文件、在单次运行中按顺序执行以下步骤:
- 发送
sbl_uart_uniflash.release.hs_fs.tiimage
(通过 UART 引导启动闪存写入器) - 对 OSPI NOR 闪存执行后续写入、例如:
:OSPI PHY 调优
:Appimage 闪烁
:SBL 闪烁
观察到的行为:
- 第一个命令(tiimage 传输)始终成功完成
- 在第二条命令开始时、UART 无响应、XMODEM 传输保持在 0%
- 即使跳过 PHY 调优并且仅
--operation=flash使用正常、也会发生相同的问题 - 下电上电后、只能再次执行第一条命令
- 此外、重新启动后、第一次尝试总是会导致 NAK 错误、第二次尝试会成功发送 tiimage
@Ubuntu:~$ ./uart_uniflash_image.sh
Parsing config file ...
Parsing config file ... SUCCESS. Found 2 command(s) !!!
Executing command 1 of 2 ...
Found flash writer ... sending /home/kozai/cms_proj/uniflash_img/sbl_uart_uniflash.release.hs_fs.tiimage
Sending /home/kozai/cms_proj/uniflash_img/sbl_uart_uniflash.release.hs_fs.tiimage: 0%| | 0/329295 [00:00<?, ?bytes/s]send error: expected NAK, CRC, EOT or CAN; got b'c'
send error: expected NAK, CRC, EOT or CAN; got b'1'
send error: expected NAK, CRC, EOT or CAN; got b'1'
send error: expected NAK, CRC, EOT or CAN; got b'9'
send error: expected NAK, CRC, EOT or CAN; got b'a'
send error: expected NAK, CRC, EOT or CAN; got b'3'
send error: expected NAK, CRC, EOT or CAN; got b'7'
send error: expected NAK, CRC, EOT or CAN; got b'5'
send error: expected NAK, CRC, EOT or CAN; got b'1'
send error: expected NAK, CRC, EOT or CAN; got b'2'
send error: expected NAK, CRC, EOT or CAN; got b'7'
send error: error_count reached 10, aborting.
Sending /home/kozai/cms_proj/uniflash_img/sbl_uart_uniflash.release.hs_fs.tiimage: 0%| | 2/329295 [00:00<1:09:56, 78.47bytes/s]
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!
@Ubuntu:~$ ./uart_uniflash_image.sh
Parsing config file ...
Parsing config file ... SUCCESS. Found 2 command(s) !!!
Executing command 1 of 2 ...
Found flash writer ... sending /home/kozai/cms_proj/uniflash_img/sbl_uart_uniflash.release.hs_fs.tiimage
Sent flashwriter /home/kozai/cms_proj/uniflash_img/sbl_uart_uniflash.release.hs_fs.tiimage of size 329295 bytes in 30.09s.
Executing command 2 of 2 ...
Command arguments : --operation=flash-phy-tuning-data
Sending flash-phy-tuning-data_command: 0%| | 0/32 [00:00<?, ?bytes/s]^C
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!
