Hi
You can ensure that your STP configuration is correct by confirming the following:
1. Ensure that you Core (B5's) is configured as the STP root bridge (If using MSTP ensure it is root for all instances)
2. On the HP edge you can enable STP, configure edge ports for "STP edge" and enable "BPDU Protection"
On your Core run "Show spantree stats active" and ensure that the Core is indeed the STP Root brdige.
Do the same on the HP edge, show spanning-tree and ensure that the Core is the root bridge.
Also on the HP edge you should notice one or two ports in discarding state, this will be your port that is causing the loop.
Hope this helps